dart-sass/test/node_api/value/null_test.dart

35 lines
751 B
Dart
Raw Normal View History

// Copyright 2018 Google Inc. Use of this source code is governed by an
// MIT-style license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
@TestOn('node')
2018-11-16 00:16:24 +01:00
@Tags(['node'])
import 'dart:js_util';
import 'package:test/test.dart';
import '../api.dart';
import 'utils.dart';
void main() {
group("from a parameter", () {
2019-05-31 16:45:27 +02:00
Object value;
setUp(() {
value = parseValue("null");
});
test("is instanceof Null", () {
expect(value, isJSInstanceOf(sass.types.Null));
});
test("equals NULL", () {
expect(value, equals(sass.types.Null.NULL));
});
});
test("the constructor throws", () {
expect(() => callConstructor(sass.types.Null, []), throwsA(anything));
});
}