Skip to content

Commit 3b28eca

Browse files
committed
[Tests] add Date and RegExp tests
1 parent 4324cbb commit 3b28eca

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Diff for: test/values.js

+15
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,18 @@ test('Booleans', function (t) {
154154

155155
t.end();
156156
});
157+
158+
test('Date', function (t) {
159+
var now = new Date();
160+
t.equal(inspect(now), String(now), 'Date shows properly');
161+
t.equal(inspect(new Date(NaN)), 'Invalid Date', 'Invalid Date shows properly');
162+
163+
t.end();
164+
});
165+
166+
test('RegExps', function (t) {
167+
t.equal(inspect(/a/g), '/a/g', 'regex shows properly');
168+
t.equal(inspect(new RegExp('abc', 'i')), '/abc/i', 'new RegExp shows properly');
169+
170+
t.end();
171+
});

0 commit comments

Comments
 (0)