Closed sudo-suhas closed 7 years ago
Is this still reproducible for you?
Because for me, it's not.
Yes it is:
λ yarn test
yarn run v1.2.1
$ ava
12 passed
3 failed
lib » check explicit opt-ins & opt-outs (via env vars)
E:\Projects\repos\opt-cli\test\lib.js:68
67:
68: t.deepEqual( retrievedOpts, expectedOpts, 'retrieved opts should equal expected opts' );
69: } );
retrieved opts should equal expected opts
Difference:
{
- 'ENV-VAR-OPTED-IN-FOO-RULE:ENV-VAR-OPTED-IN-BAR-RULE': true,
- 'ENV-VAR-OPTED-OUT-FOO-RULE:ENV-VAR-OPTED-OUT-BAR-RULE': false,
+ 'ENV-VAR-OPTED-IN-BAR-RULE': true,
+ 'ENV-VAR-OPTED-IN-FOO-RULE': true,
+ 'ENV-VAR-OPTED-OUT-BAR-RULE': false,
+ 'ENV-VAR-OPTED-OUT-FOO-RULE': false,
}
lib » test for particular opt-ins (env var existing)
E:\Projects\repos\opt-cli\test\lib.js:112
111:
112: t.true(
113: testOptIn( [ 'ENV-VAR-OPTED-IN-FOO-RULE', 'ENV-VAR-OPTED-IN-BAR-RULE' ] ),
ENV-VAR-OPTED-IN-FOO-RULE & ENV-VAR-OPTED-IN-BAR-RULE should be true
Value is not `true`:
false
testOptIn([ENV-VAR-OPTED-IN-FOO-RULE,ENV-VAR-OPTED-IN-BAR-RULE])
=> false
[ENV-VAR-OPTED-IN-FOO-RULE,ENV-VAR-OPTED-IN-BAR-RULE]
=> [
'ENV-VAR-OPTED-IN-FOO-RULE',
'ENV-VAR-OPTED-IN-BAR-RULE',
]
lib » test for particular opt-outs (env var existing)
E:\Projects\repos\opt-cli\test\lib.js:174
173:
174: t.true(
175: testOptOut( [ 'ENV-VAR-OPTED-OUT-FOO-RULE', 'ENV-VAR-OPTED-OUT-BAR-RULE' ] ),
ENV-VAR-OPTED-OUT-FOO-RULE & ENV-VAR-OPTED-OUT-BAR-RULE should be true
Value is not `true`:
false
testOptOut([ENV-VAR-OPTED-OUT-FOO-RULE,ENV-VAR-OPTED-OUT-BAR-RULE])
=> false
[ENV-VAR-OPTED-OUT-FOO-RULE,ENV-VAR-OPTED-OUT-BAR-RULE]
=> [
'ENV-VAR-OPTED-OUT-FOO-RULE',
'ENV-VAR-OPTED-OUT-BAR-RULE',
]
error Command failed with exit code 1.
Note: I fetched in the latest master and ran yarn
before running the tests.
Could you please fetch fix/windows-tests
and test again?
I'm pretty sure it's the delimiter in the env. vars being hardcoded as ':', which is not correct for Windows machines (where it should be ';' instead).
Yes, the failing tests are fixed in fix/windows-tests
.
The changed tests are merged and now available via master
.
Thanks for checking and reporting the issue in the first place!
I was trying to fix a bug but found that 3 tests were failing on master branch:
More info: