Skip to content

Commit

Permalink
fix: add debug console
Browse files Browse the repository at this point in the history
  • Loading branch information
Magomed Chemurziev committed Sep 9, 2024
1 parent 812b2ed commit f225bca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"test:typescript": "node node_modules/@v4fire/typescript-check",
"test:eslint": "npx eslint config build src",
"test:jest": "cross-env NODE_ENV=development && jest",
"test:ci:jest": "cross-env NODE_ENV=development && jest --maxWorkers 4 --reporters=\"github-actions\" --reporters=\"default\"",
"test:ci:jest": "cross-env NODE_ENV=development && jest --maxWorkers 4 --reporters=\"github-actions\" --reporters=\"default\" --silent false",
"up": "yarn && gulp build:standalone && gulp build:doc"
},
"dependencies": {
Expand Down
7 changes: 4 additions & 3 deletions src/core/prelude/date/create/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,18 @@ describe('core/prelude/date/create', () => {

it('should consider a time when getting the timezone', () => {
Date.prototype.getTimezoneOffset = function getTimezoneOffset() {
const date = this.getDate();
const dateISO = this.toISOString();

if (date < 20) {
console.log({dateISO});
if (dateISO.startsWith('1992-01-18')) {
return -(2 * 60);
}

return -(3 * 60);
};

expect(Date.create('19.01.1992')).toEqual(new Date('1992-01-18T22:00:00.000Z'));
expect(Date.create('20.01.1992 10:00:00')).toEqual(new Date('1992-01-20T07:00:00.000Z'));
expect(Date.create('19.01.1992 10:00:00')).toEqual(new Date('1992-01-19T07:00:00.000Z'));
});
});
});

0 comments on commit f225bca

Please sign in to comment.