Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 1366556

Browse files
committed
test(filters): fix timezone-dependent test
Closes #4218
1 parent fe65932 commit 1366556

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: test/ng/filter/filtersSpec.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,10 @@ describe('filters', function() {
247247
});
248248

249249
it('should accept negative numbers as strings', function() {
250-
expect(date('-1')).toEqual('Dec 31, 1969');
250+
//Note: this tests a timestamp set for 3 days before the unix epoch.
251+
//The behavior of `date` depends on your timezone, which is why we check just
252+
//the year and not the whole daye. See Issue #4218
253+
expect(date('-259200000').split(' ')[2]).toEqual('1969');
251254
});
252255

253256
it('should format timezones correctly (as per ISO_8601)', function() {

0 commit comments

Comments
 (0)