Introduce Monorepo #3069
node.js.yml
on: pull_request
Create Package
2m 20s
Tests
2m 6s
Test coverage
1m 24s
Transformer Tests
1m 7s
Cypress
3m 21s
Performance
1m 15s
Annotations
1 error and 2 warnings
Test coverage
Error: Command failed: LAUNCHDARKLY_FLAGS=tokenThemes,gitBranchSelector,multiFileSync,tokenFlowButton npx jest --collectCoverageFrom='["src/**/*.{js,jsx,ts,tsx}"]' --coverage --collectCoverage=true --coverageDirectory='./' --coverageReporters='json-summary' --forceExit --detectOpenHandles
FAIL packages/tokens-studio-for-figma/src/storage/__tests__/GithubTokenStorage.test.ts
● Test suite failed to run
SyntaxError: /home/runner/work/figma-plugin/figma-plugin/packages/tokens-studio-for-figma/src/storage/__tests__/GithubTokenStorage.test.ts: Unexpected token, expected "," (282:43)
280 |
281 | it('can read from Git in a multi file format and return empty array when there is no content', async () => {
> 282 | mockGetContent.mockImplementation((opts: { path: string }) => {
| ^
283 | if (opts.path === '') {
284 | return Promise.resolve({
285 | data: [
at constructor (node_modules/jest-config/node_modules/@babel/parser/src/parse-error.ts:81:19)
FAIL packages/tokens-studio-for-figma/src/app/store/models/tokenState.test.ts
● Test suite failed to run
Jest encountered an unexpected token
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.
By default "node_modules" folder is ignored by transformers.
Here's what you can do:
• If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
• If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/configuration
For information about custom transformations, see:
https://jestjs.io/docs/code-transformation
Details:
SyntaxError: /home/runner/work/figma-plugin/figma-plugin/packages/tokens-studio-for-figma/src/app/store/models/tokenState.test.ts: Missing semicolon. (10:57)
8 | import { INTERNAL_THEMES_NO_GROUP } from '@/constants/InternalTokenGroup';
9 |
> 10 | const mockedUpdateTokensOnSources = updateTokensOnSources as jest.MockedFunction<typeof updateTokensOnSources>;
| ^
11 |
12 | jest.mock('../updateSources', () => jest.fn());
13 |
at constructor (node_modules/jest-config/node_modules/@babel/parser/src/parse-error.ts:81:19)
at parser.next (<anonymous>)
at normalizeFile.next (<anonymous>)
at run.next (<anonymous>)
at transform.next (<anonymous>)
at evaluateSync (node_modules/gensync/index.js:251:28)
at sync (node_modules/gensync/index.js:89:14)
at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31)
at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40)
at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19)
FAIL packages/tokens-studio-for-figma/src/app/store/remoteTokens.test.ts
● Test suite failed to run
SyntaxError: /home/runner/work/figma-plugin/figma-plugin/packages/tokens-studio-for-figma/src/app/store/remoteTokens.test.ts: Unexpected token, expected "," (49:30)
47 | jest.spyOn(console, 'log').mockImplementation(() => { });
48 |
> 49 | const mockSelector = (selector: Sele
|
Test coverage
The following actions uses node12 which is deprecated and will be forced to run on node16: anuraag016/Jest-Coverage-Diff@master. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Create Package
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/upload-artifact@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
package
Expired
|
23.7 MB |
|