Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
fix: Timezone and DST agnostic Unit test
Browse files Browse the repository at this point in the history
Date generated for use in the unit test ‘should ignore a date param’ changed to be date only, in local time, to avoid having the test fail based on the timezone of the machine the test is run on.
  • Loading branch information
TheTalisman authored and knalli committed Jun 22, 2017
1 parent a30e37a commit b3b04bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/service/default-interpolation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ describe('pascalprecht.translate', function () {
it('should ignore a date param', inject(function ($translateSanitization) {
var text = 'Day is: {{day | date:"dd.MM.yyyy"}}';
var params = {
day : new Date('2016-08-21')
day : new Date(2016, 1, 21)
};
var sanitizedText = 'Day is: 21.08.2016';
var sanitizedText = 'Day is: 21.02.2016';

spyOn($translateSanitization, 'sanitize').and.callThrough();
$translateSanitization.useStrategy('escapeParameters');
Expand Down

0 comments on commit b3b04bd

Please sign in to comment.