Skip to content

Fix tests on macOS and execute during CI #2159

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

Closed
lucas-koehler opened this issue Jul 11, 2023 · 2 comments · Fixed by #2171
Closed

Fix tests on macOS and execute during CI #2159

lucas-koehler opened this issue Jul 11, 2023 · 2 comments · Fixed by #2171
Labels
Milestone

Comments

@lucas-koehler
Copy link
Contributor

lucas-koehler commented Jul 11, 2023

Is your feature request related to a problem? Please describe.

Tests currently don't work on MacOS and, thus, are not executed during CI.

Describe the solution you'd like

The tests should be fixed and run during CI.

@DrewHoo
Copy link
Contributor

DrewHoo commented Aug 9, 2023

I don't have a fix for this to be fully cross-platform, but this is what I've done locally for running tests in the core package (just commenting so this shows up in issues search):

// in packages/core/package.json
"test": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\",\"target\":\"es5\"}' ava",

whereas currently it looks like:

"test": "cross-env TS_NODE_COMPILER_OPTIONS={\\\"module\\\":\\\"commonjs\\\",\\\"target\\\":\\\"es5\\\"} ava",

and gives this error when running tests:

SyntaxError: Unexpected token a in JSON at position 1
  parse (/your/path/here/jsonforms/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/util.ts:58:43)
  Object.<anonymous> (/your/path/here/jsonforms/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:457:25)

@lucas-koehler
Copy link
Contributor Author

@DrewHoo Thanks for the hints :) Your fix gave me an idea to see if these configs can be done in a platform independent way. Turns out they can (see #2171)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants