Closed cesardariogar closed 8 years ago
Reference to the same problem. Unit tests fail on chrome #3033
Unit tests fail when run in Australia #5017
Local fail on master on one of date filter tests #4218
date filter not adding appropriate + / - sign for 'Z' timezone offset resulting in invalid ISO 8601 #1532
Perhaps related ...
fix it :D
@cesardariogarcia, could you test if #14285 fixes the issue for you (it does for me locally when setting my locale settings to Australia/Sydney). You can grab the files from here.
Sure I will give it a try later today.
@gkalpak #14285 indeed Fixed the issue.
I changed the getLocalDateString test as in: test(TzDate): fix test in Australia #14285 and it works on Chrome 49.0.2623 now.
it('should fake getLocalDateString method', function() {
var millenium = new Date('2000').getTime();
// millenium in -3h
var t0 = new angular.mock.TzDate(-3, millenium);
expect(t0.toLocaleDateString()).toMatch('2000');
// millenium in +0h
var t1 = new angular.mock.TzDate(0, millenium);
expect(t1.toLocaleDateString()).toMatch('2000');
// millenium in +3h
var t2 = new angular.mock.TzDate(3, millenium);
expect(t2.toLocaleDateString()).toMatch('1999');
});
So i guess this will work over all the browsers that maintain differences over their pre-DST time implementation.
Thanks gkalpak, greetings.
The results:
cgarcia@NSL-CGARCIA:~/Documents/@Versioning_control/@Forks/angular.js$ grunt test:unit
Running "shell:npm-install" (shell) task
:-) npm dependencies are looking good!
Running "tests:jqlite" (tests) task
21 03 2016 10:05:47.284:WARN [watcher]: All files matched by "/home/cgarcia/Documents/@Versioning_control/@Forks/angular.js/src/angular.bind.js" were excluded.
21 03 2016 10:05:47.438:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
21 03 2016 10:05:47.453:INFO [launcher]: Starting browser Chrome
21 03 2016 10:05:48.415:INFO [Chrome 49.0.2623 (Linux 0.0.0)]: Connected on socket /#Rg4v4jJk5nSfsS72AAAA with id 62592696
Chrome 49.0.2623 (Linux 0.0.0): Executed 5146 of 5146 SUCCESS (37.022 secs / 35.887 secs)
Running "tests:jquery" (tests) task
21 03 2016 10:06:30.410:WARN [watcher]: All files matched by "/home/cgarcia/Documents/@Versioning_control/@Forks/angular.js/src/angular.bind.js" were excluded.
21 03 2016 10:06:30.566:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
21 03 2016 10:06:30.580:INFO [launcher]: Starting browser Chrome
21 03 2016 10:06:31.976:INFO [Chrome 49.0.2623 (Linux 0.0.0)]: Connected on socket /#sY97bLstuc8edHPqAAAA with id 89191529
Chrome 49.0.2623 (Linux 0.0.0): Executed 5158 of 5158 SUCCESS (38.564 secs / 37.469 secs)
Running "tests:jquery-2.1" (tests) task
21 03 2016 10:07:15.059:WARN [watcher]: All files matched by "/home/cgarcia/Documents/@Versioning_control/@Forks/angular.js/src/angular.bind.js" were excluded.
21 03 2016 10:07:15.128:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
21 03 2016 10:07:15.136:INFO [launcher]: Starting browser Chrome
21 03 2016 10:07:15.952:INFO [Chrome 49.0.2623 (Linux 0.0.0)]: Connected on socket /#uBXyhlqfRhwmZz0UAAAA with id 14286701
Chrome 49.0.2623 (Linux 0.0.0): Executed 5158 of 5158 SUCCESS (35.925 secs / 34.926 secs)
Running "build:scenario" (build) task
>> File build/angular-scenario.js created.
Running "build:angular" (build) task
>> File build/angular.js created.
Running "build:loader" (build) task
>> File build/angular-loader.js created.
Running "build:touch" (build) task
>> File build/angular-touch.js created.
Running "build:mocks" (build) task
>> File build/angular-mocks.js created.
Running "build:sanitize" (build) task
>> File build/angular-sanitize.js created.
Running "build:resource" (build) task
>> File build/angular-resource.js created.
Running "build:messageformat" (build) task
>> File build/angular-message-format.js created.
Running "build:messages" (build) task
>> File build/angular-messages.js created.
Running "build:animate" (build) task
>> File build/angular-animate.js created.
Running "build:route" (build) task
>> File build/angular-route.js created.
Running "build:cookies" (build) task
>> File build/angular-cookies.js created.
Running "build:aria" (build) task
>> File build/angular-aria.js created.
Running "build:promises-aplus-adapter" (build) task
>> File tmp/promises-aplus-adapter++.js created.
Running "tests:modules" (tests) task
21 03 2016 10:07:57.554:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
21 03 2016 10:07:57.576:INFO [launcher]: Starting browser Chrome
21 03 2016 10:07:58.732:INFO [Chrome 49.0.2623 (Linux 0.0.0)]: Connected on socket /#pzNJeMKRTvVyMw4MAAAA with id 62530143
Chrome 49.0.2623 (Linux 0.0.0): Executed 760 of 760 SUCCESS (6.538 secs / 6.262 secs)
Done, without errors.
Do you want to request a feature or report a bug? Bug
What is the current behavior? Unit Test suite fails on Chrome at test # 5146
What is the expected behavior? All test should pass on a clean build.
I've just cloned the '/angular/angular.js' (Version 1.5.1), build it without errors and with the clean build when run the preloaded unit tests with grunt (grunt test:unit) it throws the same error mentioned by @wagnerfrancisco when tests Chrome.
(All the test PASS except this one)
Reproducable: Always Browser: Chrome 49.0.2623 Operating System: Ubuntu 15.10 (Wily Werewolf)
steps to reproduce: 1)Clone the repository of Angular.js
2)Building & Testing Have node v 0.12.4 pre-installed Have java version 1.8.0_74 pre-installed Install Grunt & Bower:
3)Running the Test Suite
The piece of code that runs this test is: (/angular.js/test/ngMock/angular-mocksSpec.js)
and the code that is referenced: (/angular.js/src/ngMock/angular-mock.js)
I want to contribute to the angular.js project but I'm not sure if this is a legit problem to work on
sorry if the post is too long :).