-
Notifications
You must be signed in to change notification settings - Fork 347
/
null_test.dart
41 lines (32 loc) · 1.04 KB
/
null_test.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// 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')
@Tags(['node'])
import 'dart:js_util';
import 'package:test/test.dart';
import '../api.dart';
import 'utils.dart';
void main() {
group("from a parameter", () {
late NodeSassNull value;
setUp(() {
value = parseValue<NodeSassNull>("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", () {
// TODO(nweiz): Remove this ignore and add an explicit type argument once we
// support only Dart SDKs >= 2.15.
// ignore: inference_failure_on_function_invocation
expect(() => callConstructor(sass.types.Null, []), throwsA(anything));
});
test("the convenience accessor sass.NULL exists", () {
expect(sass.NULL, equals(sass.types.Null.NULL));
});
}