Skip to content
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

Add jest-coverage-report-action #108

Merged
merged 6 commits into from
Jan 15, 2024
Merged

Add jest-coverage-report-action #108

merged 6 commits into from
Jan 15, 2024

Conversation

maaaathis
Copy link
Member

@maaaathis maaaathis commented Jan 15, 2024

closes #52

@maaaathis maaaathis added the github_actions Pull requests that update GitHub Actions code label Jan 15, 2024
@maaaathis maaaathis self-assigned this Jan 15, 2024
@maaaathis maaaathis marked this pull request as draft January 15, 2024 09:58
Copy link
Contributor

github-actions bot commented Jan 15, 2024

Coverage report

❌ An unexpected error occurred. For more details, check console

Error: The process '/usr/local/bin/npx' failed with exit code 1
St.
Category Percentage Covered / Total
🟢 Statements 100% 0/0
🟢 Branches 100% 0/0
🟢 Functions 100% 0/0
🟢 Lines 100% 0/0

Test suite run failed

Failed tests: 0/0. Failed suites: 7/7.
  ● Test suite failed to run

    SyntaxError: /home/runner/work/flow/flow/packages/components/src/lib/propsContext/mergePropsContext.test.ts: Unexpected token, expected "," (5:31)

      3 | import { PropsContext } from "@/lib/propsContext";
      4 |
    > 5 | test.each<{ first: PropsContext; second: PropsContext; merged: PropsContext }>([
        |                                ^
      6 |   { first: {}, second: {}, merged: {} },
      7 |   {
      8 |     first: {

      at constructor (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parse-error.ts:81:19)
      at Parser.toParseError [as raise] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/tokenizer/index.ts:1487:19)
      at Parser.raise [as unexpected] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/tokenizer/index.ts:1528:16)
      at Parser.unexpected [as expect] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/util.ts:148:28)
      at Parser.expect [as parseObjectLike] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:2062:14)
      at Parser.parseObjectLike [as parseExprAtom] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:1193:21)
      at Parser.parseExprAtom [as parseExprSubscripts] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:705:23)
      at Parser.parseExprSubscripts [as parseUpdate] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:682:21)
      at Parser.parseUpdate [as parseMaybeUnary] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:644:23)
      at Parser.parseMaybeUnary [as parseMaybeUnaryOrPrivate] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:382:14)
      at Parser.parseMaybeUnaryOrPrivate (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:554:12)
      at Parser.parseExprOpBaseRightExpr [as parseExprOpRightExpr] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:539:21)
      at Parser.parseExprOpRightExpr [as parseExprOp] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:475:27)
      at Parser.parseExprOp [as parseExprOps] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:400:17)
      at Parser.parseExprOps [as parseMaybeConditional] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:349:23)
      at Parser.parseMaybeConditional [as parseMaybeAssign] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:289:21)
      at Parser.parseMaybeAssign [as parseExpressionBase] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:212:23)
      at parseExpressionBase (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:203:39)
      at Parser.callback [as allowInAnd] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:3134:16)
      at Parser.allowInAnd [as parseExpression] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:203:17)
      at Parser.parseExpression [as parseStatementContent] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:644:23)
      at Parser.parseStatementContent [as parseStatementLike] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:416:17)
      at Parser.parseStatementLike [as parseModuleItem] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:353:17)
      at Parser.parseModuleItem [as parseBlockOrModuleBlockBody] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1393:16)
      at Parser.parseBlockOrModuleBlockBody [as parseBlockBody] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1367:10)
      at Parser.parseBlockBody [as parseProgram] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:212:10)
      at Parser.parseProgram [as parseTopLevel] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:194:25)
      at Parser.parseTopLevel [as parse] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/index.ts:45:10)
      at parse (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/index.ts:66:38)
      at parser (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/parser/index.ts:28:19)
          at parser.next (<anonymous>)
      at normalizeFile (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transformation/normalize-file.ts:50:24)
          at normalizeFile.next (<anonymous>)
      at run (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transformation/index.ts:39:36)
          at run.next (<anonymous>)
      at transform (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transform.ts:29:20)
          at transform.next (<anonymous>)
      at evaluateSync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/gensync/index.js:251:28)
      at sync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/gensync/index.js:89:14)
      at fn (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/errors/rewrite-stack-trace.ts:99:14)
      at transformSync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transform.ts:66:52)
      at ScriptTransformer.transformSource (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:545:31)
      at ScriptTransformer._transformAndBuildScript (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:674:40)
      at ScriptTransformer.transform (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:726:19)


  ● Test suite failed to run

    SyntaxError: /home/runner/work/flow/flow/packages/components/dev/viteI18nPlugin.test.ts: Unexpected token, expected "from" (4:12)

      2 | import { expect } from "@jest/globals";
      3 | import path from "path";
    > 4 | import type {
        |             ^
      5 |   PartialResolvedId,
      6 |   PluginContext,
      7 |   TransformPluginContext,

      at constructor (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parse-error.ts:81:19)
      at Parser.toParseError [as raise] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/tokenizer/index.ts:1487:19)
      at Parser.raise [as unexpected] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/tokenizer/index.ts:1528:16)
      at Parser.unexpected [as expectContextual] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/util.ts:107:12)
      at Parser.expectContextual [as parseImportSpecifiersAndAfter] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:3110:10)
      at Parser.parseImportSpecifiersAndAfter [as parseImport] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:3078:17)
      at Parser.parseImport [as parseStatementContent] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:587:25)
      at Parser.parseStatementContent [as parseStatementLike] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:416:17)
      at Parser.parseStatementLike [as parseModuleItem] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:353:17)
      at Parser.parseModuleItem [as parseBlockOrModuleBlockBody] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1393:16)
      at Parser.parseBlockOrModuleBlockBody [as parseBlockBody] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1367:10)
      at Parser.parseBlockBody [as parseProgram] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:212:10)
      at Parser.parseProgram [as parseTopLevel] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:194:25)
      at Parser.parseTopLevel [as parse] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/index.ts:45:10)
      at parse (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/index.ts:66:38)
      at parser (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/parser/index.ts:28:19)
          at parser.next (<anonymous>)
      at normalizeFile (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transformation/normalize-file.ts:50:24)
          at normalizeFile.next (<anonymous>)
      at run (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transformation/index.ts:39:36)
          at run.next (<anonymous>)
      at transform (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transform.ts:29:20)
          at transform.next (<anonymous>)
      at evaluateSync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/gensync/index.js:251:28)
      at sync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/gensync/index.js:89:14)
      at fn (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/errors/rewrite-stack-trace.ts:99:14)
      at transformSync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transform.ts:66:52)
      at ScriptTransformer.transformSource (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:545:31)
      at ScriptTransformer._transformAndBuildScript (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:674:40)
      at ScriptTransformer.transform (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:726:19)


  ● 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/flow/flow/packages/components/src/lib/propsContext/useProps.test.tsx: Missing semicolon. (17:15)

      15 | import { TestComponentProps } from "@/lib/propsContext/test";
      16 |
    > 17 | let renderCount: number;
         |                ^
      18 | let renderedPropHistory: Array<string | undefined>;
      19 |
      20 | const ComponentUsingProps: FC<TestComponentProps> = (props) => {

      at constructor (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parse-error.ts:81:19)
      at Parser.toParseError [as raise] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/tokenizer/index.ts:1487:19)
      at Parser.raise [as semicolon] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/util.ts:141:10)
      at Parser.semicolon [as parseVarStatement] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1201:10)
      at Parser.parseVarStatement [as parseStatementContent] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:553:21)
      at Parser.parseStatementContent [as parseStatementLike] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:416:17)
      at Parser.parseStatementLike [as parseModuleItem] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:353:17)
      at Parser.parseModuleItem [as parseBlockOrModuleBlockBody] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1393:16)
      at Parser.parseBlockOrModuleBlockBody [as parseBlockBody] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1367:10)
      at Parser.parseBlockBody [as parseProgram] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:212:10)
      at Parser.parseProgram [as parseTopLevel] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:194:25)
      at Parser.parseTopLevel [as parse] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/index.ts:45:10)
      at parse (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/index.ts:66:38)
      at parser (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/parser/index.ts:28:19)
          at parser.next (<anonymous>)
      at normalizeFile (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transformation/normalize-file.ts:50:24)
          at normalizeFile.next (<anonymous>)
      at run (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transformation/index.ts:39:36)
          at run.next (<anonymous>)
      at transform (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transform.ts:29:20)
          at transform.next (<anonymous>)
      at evaluateSync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/gensync/index.js:251:28)
      at sync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/gensync/index.js:89:14)
      at fn (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/errors/rewrite-stack-trace.ts:99:14)
      at transformSync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transform.ts:66:52)
      at ScriptTransformer.transformSource (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:545:31)
      at ScriptTransformer._transformAndBuildScript (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:674:40)
      at ScriptTransformer.transform (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:726:19)


  ● 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/flow/flow/packages/components/src/lib/propsContext/ClearPropsContext.test.tsx: Missing initializer in const declaration. (9:25)

       7 | import { TestComponentProps } from "@/lib/propsContext/test";
       8 |
    >  9 | const ComponentUsingProps: FC<TestComponentProps> = (props) => {
         |                          ^
      10 |   const { testProp } = useProps("test", props);
      11 |   return <span data-testid="prop-value">{testProp ?? "undefined"}</span>;
      12 | };

      at constructor (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parse-error.ts:81:19)
      at Parser.toParseError [as raise] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/tokenizer/index.ts:1487:19)
      at Parser.raise [as parseVar] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1554:16)
      at Parser.parseVar [as parseVarStatement] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1200:10)
      at Parser.parseVarStatement [as parseStatementContent] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:553:21)
      at Parser.parseStatementContent [as parseStatementLike] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:416:17)
      at Parser.parseStatementLike [as parseModuleItem] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:353:17)
      at Parser.parseModuleItem [as parseBlockOrModuleBlockBody] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1393:16)
      at Parser.parseBlockOrModuleBlockBody [as parseBlockBody] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1367:10)
      at Parser.parseBlockBody [as parseProgram] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:212:10)
      at Parser.parseProgram [as parseTopLevel] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:194:25)
      at Parser.parseTopLevel [as parse] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/index.ts:45:10)
      at parse (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/index.ts:66:38)
      at parser (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/parser/index.ts:28:19)
          at parser.next (<anonymous>)
      at normalizeFile (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transformation/normalize-file.ts:50:24)
          at normalizeFile.next (<anonymous>)
      at run (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transformation/index.ts:39:36)
          at run.next (<anonymous>)
      at transform (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transform.ts:29:20)
          at transform.next (<anonymous>)
      at evaluateSync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/gensync/index.js:251:28)
      at sync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/gensync/index.js:89:14)
      at fn (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/errors/rewrite-stack-trace.ts:99:14)
      at transformSync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transform.ts:66:52)
      at ScriptTransformer.transformSource (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:545:31)
      at ScriptTransformer._transformAndBuildScript (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:674:40)
      at ScriptTransformer.transform (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:726:19)


  ● 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:

    /home/runner/work/flow/flow/packages/components/dev/cssModuleClassNameGenerator.test.ts:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import { cssModuleClassNameGenerator } from "./cssModuleClassNameGenerator";
                                                                                      ^^^^^^

    SyntaxError: Cannot use import statement outside a module

      at Runtime.createScriptFromCode (../../../.npm/_npx/b8d86e6551a4f492/node_modules/jest-runtime/build/index.js:1505:14)


  ● 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:

    /home/runner/work/flow/flow/packages/components/src/components/Icon/lib/extractSvgFromString.test.tsx:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import { expect } from "@jest/globals";
                                                                                      ^^^^^^

    SyntaxError: Cannot use import statement outside a module

      at Runtime.createScriptFromCode (../../../.npm/_npx/b8d86e6551a4f492/node_modules/jest-runtime/build/index.js:1505:14)


  ● 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/flow/flow/packages/components/src/lib/propsContext/dynamicProps/resolveDynamicProps.test.ts: Unexpected token (12:4)

      10 |         type: "submit",
      11 |       },
    > 12 |     ),
         |     ^
      13 |   ).toEqual({
      14 |     isDisabled: true,
      15 |   });

      at constructor (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parse-error.ts:81:19)
      at Parser.toParseError [as raise] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/tokenizer/index.ts:1487:19)
      at Parser.raise [as unexpected] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/tokenizer/index.ts:1528:16)
      at Parser.unexpected [as parseParenAndDistinguishExpression] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:1835:37)
      at Parser.parseParenAndDistinguishExpression [as parseExprAtom] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:1165:21)
      at Parser.parseExprAtom [as parseExprSubscripts] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:705:23)
      at Parser.parseExprSubscripts [as parseUpdate] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:682:21)
      at Parser.parseUpdate [as parseMaybeUnary] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:644:23)
      at Parser.parseMaybeUnary [as parseMaybeUnaryOrPrivate] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:382:14)
      at Parser.parseMaybeUnaryOrPrivate (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:554:12)
      at Parser.parseExprOpBaseRightExpr [as parseExprOpRightExpr] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:539:21)
      at Parser.parseExprOpRightExpr [as parseExprOp] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:475:27)
      at Parser.parseExprOp (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:495:21)
      at Parser.parseExprOp [as parseExprOps] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:400:17)
      at Parser.parseExprOps [as parseMaybeConditional] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:349:23)
      at Parser.parseMaybeConditional [as parseMaybeAssign] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:289:21)
      at parseMaybeAssign (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:243:12)
      at Parser.callback [as allowInAnd] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:3139:12)
      at Parser.allowInAnd [as parseMaybeAssignAllowIn] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:242:17)
      at Parser.parseMaybeAssignAllowIn [as parseExprListItem] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:2752:18)
      at Parser.parseExprListItem [as parseCallExpressionArguments] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:1039:14)
      at Parser.parseCallExpressionArguments [as parseCoverCallAndAsyncArrowHead] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:881:29)
      at Parser.parseCoverCallAndAsyncArrowHead [as parseSubscript] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:770:19)
      at Parser.parseSubscript [as parseSubscripts] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:726:19)
      at Parser.parseSubscripts [as parseExprSubscripts] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:711:17)
      at Parser.parseExprSubscripts [as parseUpdate] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:682:21)
      at Parser.parseUpdate [as parseMaybeUnary] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:644:23)
      at Parser.parseMaybeUnary [as parseMaybeUnaryOrPrivate] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:382:14)
      at Parser.parseMaybeUnaryOrPrivate [as parseExprOps] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:394:23)
      at Parser.parseExprOps [as parseMaybeConditional] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:349:23)
      at Parser.parseMaybeConditional [as parseMaybeAssign] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:289:21)
      at Parser.parseMaybeAssign [as parseExpressionBase] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:212:23)
      at parseExpressionBase (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:203:39)
      at Parser.callback [as allowInAnd] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:3134:16)
      at Parser.allowInAnd [as parseExpression] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:203:17)
      at Parser.parseExpression [as parseStatementContent] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:644:23)
      at Parser.parseStatementContent [as parseStatementLike] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:416:17)
      at Parser.parseStatementLike [as parseStatementListItem] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:365:17)
      at Parser.parseStatementListItem [as parseBlockOrModuleBlockBody] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1394:16)
      at Parser.parseBlockOrModuleBlockBody [as parseBlockBody] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1367:10)
      at Parser.parseBlockBody [as parseBlock] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1335:10)
      at Parser.parseBlock [as parseFunctionBody] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:2586:24)
      at Parser.parseFunctionBody [as parseArrowExpression] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:2529:10)
      at Parser.parseArrowExpression [as parseParenAndDistinguishExpression] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:1826:12)
      at Parser.parseParenAndDistinguishExpression [as parseExprAtom] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:1165:21)
      at Parser.parseExprAtom [as parseExprSubscripts] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:705:23)
      at Parser.parseExprSubscripts [as parseUpdate] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:682:21)
      at Parser.parseUpdate [as parseMaybeUnary] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:644:23)
      at Parser.parseMaybeUnary [as parseMaybeUnaryOrPrivate] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:382:14)
      at Parser.parseMaybeUnaryOrPrivate [as parseExprOps] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:394:23)
      at Parser.parseExprOps [as parseMaybeConditional] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:349:23)
      at Parser.parseMaybeConditional [as parseMaybeAssign] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:289:21)
      at parseMaybeAssign (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:243:12)
      at Parser.callback [as allowInAnd] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:3139:12)
      at Parser.allowInAnd [as parseMaybeAssignAllowIn] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:242:17)
      at Parser.parseMaybeAssignAllowIn [as parseExprListItem] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:2752:18)
      at Parser.parseExprListItem [as parseCallExpressionArguments] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:1039:14)
      at Parser.parseCallExpressionArguments [as parseCoverCallAndAsyncArrowHead] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:881:29)
      at Parser.parseCoverCallAndAsyncArrowHead [as parseSubscript] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:770:19)
      at Parser.parseSubscript [as parseSubscripts] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:726:19)
      at Parser.parseSubscripts [as parseExprSubscripts] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:711:17)
      at Parser.parseExprSubscripts [as parseUpdate] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:682:21)
      at Parser.parseUpdate [as parseMaybeUnary] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:644:23)
      at Parser.parseMaybeUnary [as parseMaybeUnaryOrPrivate] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:382:14)
      at Parser.parseMaybeUnaryOrPrivate [as parseExprOps] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:394:23)
      at Parser.parseExprOps [as parseMaybeConditional] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:349:23)
      at Parser.parseMaybeConditional [as parseMaybeAssign] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:289:21)
      at Parser.parseMaybeAssign [as parseExpressionBase] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:212:23)
      at parseExpressionBase (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:203:39)
      at Parser.callback [as allowInAnd] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:3134:16)
      at Parser.allowInAnd [as parseExpression] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/expression.ts:203:17)
      at Parser.parseExpression [as parseStatementContent] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:644:23)
      at Parser.parseStatementContent [as parseStatementLike] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:416:17)
      at Parser.parseStatementLike [as parseModuleItem] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:353:17)
      at Parser.parseModuleItem [as parseBlockOrModuleBlockBody] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1393:16)
      at Parser.parseBlockOrModuleBlockBody [as parseBlockBody] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:1367:10)
      at Parser.parseBlockBody [as parseProgram] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:212:10)
      at Parser.parseProgram [as parseTopLevel] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/statement.ts:194:25)
      at Parser.parseTopLevel [as parse] (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/parser/index.ts:45:10)
      at parse (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/parser/src/index.ts:66:38)
      at parser (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/parser/index.ts:28:19)
          at parser.next (<anonymous>)
      at normalizeFile (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transformation/normalize-file.ts:50:24)
          at normalizeFile.next (<anonymous>)
      at run (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transformation/index.ts:39:36)
          at run.next (<anonymous>)
      at transform (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transform.ts:29:20)
          at transform.next (<anonymous>)
      at evaluateSync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/gensync/index.js:251:28)
      at sync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/gensync/index.js:89:14)
      at fn (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/errors/rewrite-stack-trace.ts:99:14)
      at transformSync (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@babel/core/src/transform.ts:66:52)
      at ScriptTransformer.transformSource (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:545:31)
      at ScriptTransformer._transformAndBuildScript (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:674:40)
      at ScriptTransformer.transform (../../../.npm/_npx/b8d86e6551a4f492/node_modules/@jest/transform/build/ScriptTransformer.js:726:19)

Report generated by 🧪jest coverage report action from 89e967d

Copy link
Contributor

Coverage report for ./packages/components/

St.
Category Percentage Covered / Total
🟢 Statements 98.52% 133/135
🟢 Branches 93.55% 29/31
🟢 Functions 88.89% 24/27
🟢 Lines 98.36% 120/122

Test suite run success

37 tests passing in 7 suites.

Report generated by 🧪jest coverage report action from 796710e

@maaaathis maaaathis added enhancement New feature or request tooling CI, config of build-tools... the painful things not related to the bare source code labels Jan 15, 2024
@maaaathis maaaathis marked this pull request as ready for review January 15, 2024 12:00
@maaaathis maaaathis requested a review from mfal January 15, 2024 12:00
@mfal mfal merged commit 6f54180 into main Jan 15, 2024
3 checks passed
@maaaathis maaaathis deleted the chore/jest-action branch January 15, 2024 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request github_actions Pull requests that update GitHub Actions code tooling CI, config of build-tools... the painful things not related to the bare source code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test coverage
2 participants