JinPhil / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

Config file order is not respected is file contains "Object" in the filename #409

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
* What steps will reproduce the problem?
1. git clone https://github.com/hthetiot/js-test-driver-issue.git
2. make tests-server&
3. make tests-verbose

* What is the expected output? What do you see instead?
Into the file tests/jsTestDriver.conf the order of JS files to load is:
 - src/Core.js
 - src/Object.js
 - src/Module.js
 - src/Storage/Object.js

But when you run the tests JsTestDriver load the file in following order:
 - src/Core.js
 - src/Object.js
 - src/Storage/Object.js
 - src/Module.js

Example:
----
Run JsTestDriver Tests Suite
setting runnermode QUIET
Chrome: Reset
Chrome: Reset
Chrome 22.0.1229.94 Linux loaded 
/test/com/google/jstestdriver/coverage/javascript/LCOV.js
Chrome 22.0.1229.94 Linux loaded /test/src/Core.js
Chrome 22.0.1229.94 Linux loaded /test/src/Object.js
Chrome 22.0.1229.94 Linux loaded /test/src/Storage/Object.js
Chrome 22.0.1229.94 Linux loaded /test/src/Module.js
Chrome 22.0.1229.94 Linux loaded /test/tests/Core.js
Total 0 tests (Passed: 0; Fails: 0; Errors: 0) (0.00 ms)
done
----

What version of the product are you using? On what operating system?
- Using JsTestDriver-1.3.5.jar and reproduced with 1.3.4.*

Please provide any additional information below.
It look like it's related to the file name because if I rename Object.js the 
order is good.

Original issue reported on code.google.com by harold.t...@netvibes.com on 15 Nov 2012 at 12:56

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Definitively not related to the "Object" usage:

----------------
Run JsTestDriver Tests Suite
setting runnermode QUIET
Chrome: Reset
Chrome: Reset
Chrome 22.0.1229.94 Linux loaded 
/test/com/google/jstestdriver/coverage/javascript/LCOV.js
Chrome 22.0.1229.94 Linux loaded /test/src/Core.js
Chrome 22.0.1229.94 Linux loaded /test/src/Storage/Toto.js
Chrome 22.0.1229.94 Linux loaded /test/src/Toto.js
Chrome 22.0.1229.94 Linux loaded /test/src/Module.js
Chrome 22.0.1229.94 Linux loaded /test/tests/Core.js
Total 0 tests (Passed: 0; Fails: 0; Errors: 0) (0.00 ms)
done

Original comment by harold.t...@netvibes.com on 15 Nov 2012 at 1:01

GoogleCodeExporter commented 8 years ago
Can you rename the issue pls:
"Config file order is not respected if file contains some filename patterns"

Original comment by harold.t...@netvibes.com on 15 Nov 2012 at 1:02

GoogleCodeExporter commented 8 years ago

Doc quote:
http://code.google.com/p/js-test-driver/wiki/ConfigurationFile

> load:
> List of files to load to browser before the test can be run. We support 
globing with > *. The files are loaded in the same order as specified in the 
configuration file or > alphabetically if using globing.

Original comment by harold.t...@netvibes.com on 15 Nov 2012 at 1:17

GoogleCodeExporter commented 8 years ago
Unit tests for this issue:
https://code.google.com/r/hthetiot-js-test-driver/source/detail?r=ed6c9992a283aa
7ac5a00a41dad58aa5e241871e

Original comment by hthetiot on 15 Nov 2012 at 4:17

GoogleCodeExporter commented 8 years ago
git remote for github added here https://github.com/hthetiot/js-test-driver 
with unit tests commit for the issue #409 instead of the one in the description 
that i deleted. 

Original comment by hthetiot on 15 Nov 2012 at 4:27

GoogleCodeExporter commented 8 years ago
Is this still being worked on? I see the same problem with 1.3.5. Basically the 
order as listed is ignored and it appears to do its own thing. This makes it 
basically impossible to run tests since the prerequisites can not be correctly 
loaded.

Original comment by aggreg...@gmail.com on 6 Feb 2014 at 5:50

GoogleCodeExporter commented 8 years ago
Create a monkey patch to preserve js load order 
https://code.google.com/r/kyawtuns-js-test-driver/source/list?name=js-load-order

Sorry, I don't know how to submit PR.

Add `glob` value to `false` in jsTestDriver.conf to preserve js load order. At 
the same it, it will remove globing, so `*` cannot be used in file loading list.

Original comment by kyawt...@gmail.com on 9 Aug 2014 at 4:51

GoogleCodeExporter commented 8 years ago
This is fixed with the patch, see http://youtrack.jetbrains.com/issue/WEB-12963 

Original comment by k...@quickleft.com on 14 Aug 2014 at 10:18