feat: support multistep glob pattern [sc-18837] #2121
Annotations
4 errors and 12 warnings
parseProject() › should parse a project with multistep & browser glob patterns:
packages/cli/src/services/util.ts#L64
Error loading file /home/runner/work/checkly-cli/checkly-cli/packages/cli/src/services/__tests__/project-parser-fixtures/multistep-browser-glob-patterns/__checks__/browser/check2.spec.js
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:
/home/runner/work/checkly-cli/checkly-cli/packages/cli/src/services/__tests__/project-parser-fixtures/multistep-browser-glob-patterns/__checks__/browser/check2.spec.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import { test } from '@playwright/test'
^^^^^^
SyntaxError: Cannot use import statement outside a module
at Runtime.createScriptFromCode (../../node_modules/jest-runtime/build/index.js:1496:14)
at loadJsFile (src/services/util.ts:64:26)
at loadAllCheckFiles (src/services/project-parser.ts:84:23)
at parseProject (src/services/project-parser.ts:63:3)
at Object.<anonymous> (src/services/__tests__/project-parser.spec.ts:200:21)
at loadJsFile (src/services/util.ts:86:15)
at loadAllCheckFiles (src/services/project-parser.ts:64:41)
at async parseProject (src/services/project-parser.ts:49:5)
at async Object.<anonymous> (src/services/__tests__/project-parser.spec.ts:217:25)
|
test - ubuntu-latest
Process completed with exit code 1.
|
test - windows-latest
The job was canceled because "ubuntu-latest" failed.
|
test - windows-latest
The operation was canceled.
|
lint
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
lint:
packages/cli/e2e/__tests__/fixtures/deploy-esm-project/api.check.mjs#L3
'api' is assigned a value but never used
|
lint:
packages/cli/e2e/__tests__/fixtures/esm-module/checks.check.ts#L3
'browserCheck' is assigned a value but never used
|
test - ubuntu-latest
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
lint:
packages/cli/e2e/__tests__/fixtures/snapshot-project-missing-snapshots/checkly.config.ts#L5
Forbidden non-null assertion
|
lint:
packages/cli/e2e/__tests__/fixtures/snapshot-project/checkly.config.ts#L5
Forbidden non-null assertion
|
lint:
packages/cli/e2e/__tests__/fixtures/test-project/src/__checks__/group.check.ts#L22
'browserCheck' is assigned a value but never used
|
lint:
packages/cli/e2e/__tests__/fixtures/test-project/src/__checks__/heartbeat.check.ts#L3
'heartbeat' is assigned a value but never used
|
lint:
packages/cli/e2e/__tests__/fixtures/test-project/src/__checks__/secret.check.ts#L3
'browserCheck' is assigned a value but never used
|
lint:
packages/cli/e2e/__tests__/fixtures/test-project/src/services/api/api.check.ts#L4
'apiCheck' is assigned a value but never used
|
lint:
packages/cli/e2e/__tests__/fixtures/test-project/src/services/api/api.check.ts#L21
'skipSslApiCheck' is assigned a value but never used
|
lint:
packages/cli/e2e/__tests__/fixtures/test-project/src/services/api/typo.checkz.ts#L3
'apiCheck' is assigned a value but never used
|