-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot get the tests to run (in Windows) #116
Comments
FWIW, the actual bug which I intended to fix is this: LDOptions in typings.d.ts has the property evaluationExplanations whereas in index.js the respective property is called evaluationReasons:
I assume adjusting LDOptions in typings.d.ts is the less disruptive way to fix this. |
Thanks for catching the wrong property name. That's certainly easy to fix. We're looking into the other cross-platform issues - as you can probably guess, we've been pretty Linux-focused in our development of this project so I'm not surprised we've missed a few things like this. |
I'm having more trouble than I expected getting the tests to run in Windows at all. If you already have a branch with the changes you've made so far, could you link to it (or just a gist of what you've got in package.json)? |
No, I haven’t created a branch yet. Wanted to get the current code to run and tests to work before changing anything. That said, if it is easier after all and you are all set-up, would you want to do that fix?
Thanks,
Krischan
From: Eli Bishop <notifications@github.com>
Sent: Tuesday, October 2, 2018 9:40 PM
To: launchdarkly/js-client <js-client@noreply.github.com>
Cc: Krischan Eberle <Krischan.Eberle@bentley.com>; Author <author@noreply.github.com>
Subject: Re: [launchdarkly/js-client] Cannot get the tests to run (#116)
I'm having more trouble than I expected getting the tests to run in Windows at all. If you already have a branch with the changes you've made so far, could you link to it (or just a gist of what you've got in package.json)?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_launchdarkly_js-2Dclient_issues_116-23issuecomment-2D426403685&d=DwMCaQ&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=cqkJcv5u5EIwr9uML7VP8dQ1bEoUvbD0gC_0xEG6gS8&m=dI19IXrz2gJddKan_6U64wVKz3FTr_jTY7HO-q370Wo&s=HTPWx6ezhPpM2oL7htieQzeVWdg3MrmUt9pdc5PdIrM&e=>, or mute the thread<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ApXuuBfl3sscbdqequPomlGSSxqqo2wOks5ug8EMgaJpZM4XDewg&d=DwMCaQ&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=cqkJcv5u5EIwr9uML7VP8dQ1bEoUvbD0gC_0xEG6gS8&m=dI19IXrz2gJddKan_6U64wVKz3FTr_jTY7HO-q370Wo&s=6qiHhaB-00jtzS-9YFXw7iRJZtSagiaUgmOBMpqH9g4&e=>.
|
Well, we would like to get the build working under Windows. But it sounds like you have had more luck so far than I've had. The environment variable issue is fairly easy to fix by changing it to use So, if you have a version of package.json that works better than that, even if the tests don't pass yet, I would appreciate a chance to see it. |
Hi Eli,
my local changes to package.json are just to use cross-env in the test and test:junit scripts:
"test": "cross-env NODE_ENV=test jest",
"test:junit": "cross-env NODE_ENV=test jest --testResultsProcessor jest-junit",
My NPM version: 5.5.1
My Node version: v8.9.3
The steps I did:
* npm install -> changed package-lock.json (let me know if these are interesting to you)
* npm run build -> succeeded
* npm run test -> failed with:
FAIL src\__tests__\EventProcessor-test.js
● Test suite failed to run
D:\dev\imodeljs\js-client\src\__tests__\EventProcessor-test.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import sinon from 'sinon';
^^^^^^
SyntaxError: Unexpected token import
at ScriptTransformer._transformAndBuildScript (../node_modules/jest-runtime/build/script_transformer.js:316:17)
Thanks,
Krischan
From: Eli Bishop <notifications@github.com>
Sent: Tuesday, October 2, 2018 11:34 PM
To: launchdarkly/js-client <js-client@noreply.github.com>
Cc: Krischan Eberle <Krischan.Eberle@bentley.com>; Author <author@noreply.github.com>
Subject: Re: [launchdarkly/js-client] Cannot get the tests to run (#116)
Well, we would like to get the build working under Windows. But it sounds like you have had more luck so far than I've had. The environment variable issue is fairly easy to fix by changing it to use cross-env (as some of the other commands already do), but I can't get it to the point of actually running any tests; currently it is failing for me with "Module jest-localstorage-mock in the setupFiles option was not found."
So, if you have a version of package.json that works better than that, even if the tests don't pass yet, I would appreciate a chance to see it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_launchdarkly_js-2Dclient_issues_116-23issuecomment-2D426438474&d=DwMFaQ&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=cqkJcv5u5EIwr9uML7VP8dQ1bEoUvbD0gC_0xEG6gS8&m=VRXmQ6Whn90pdw8NYX9yGdvP7cx2QLeLDBM25DkmOt0&s=fqgyhROQw1nVup1sl6X_9Vc37epLQALDduW0adZcX1Q&e=>, or mute the thread<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ApXuuOVcM-2DFgkefn0IH66Y6zm8AdOY74ks5ug9vlgaJpZM4XDewg&d=DwMFaQ&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=cqkJcv5u5EIwr9uML7VP8dQ1bEoUvbD0gC_0xEG6gS8&m=VRXmQ6Whn90pdw8NYX9yGdvP7cx2QLeLDBM25DkmOt0&s=CHhOKeb9xcow1rbuuwPRtSmYgENbruXvMvjWDYJEgWY&e=>.
|
Thanks. Hmm. Well, that is what I did too. My npm version is 6.4.1, maybe that makes a difference. |
What I said in my last comment was that I'm not able to run the tests. However, we did do a release yesterday which fixes the TypeScript property name error. |
Hi. I know this is pretty late, but since your original report we've made many changes to the build, including some for Windows compatibility. We are now successfully running one of our CI builds of this repository in Windows. So if you're still interested and haven't already tried this again, I recommend trying it again. |
Hi,
I found a little bug in the typing.d.ts and wanted to fix it myself via pull request etc.
I have tried to get myself set up (on a Windows machine), and found
I was able to locally fix some (not all) of the NPM scripts, but don't know what to do with the test failures.
Find some of the test failures below.
If anybody knows how to get the process to work, that would be great :)
Thanks,
Krischan
The text was updated successfully, but these errors were encountered: