jest-styled-components icon indicating copy to clipboard operation
jest-styled-components copied to clipboard

@starting-style - Error: :1:1329: missing '}'

Open jantimon opened this issue 1 year ago • 0 comments

Using the new @starting-style css feature in styled-components crashes jest:

Error: :1:1329: missing '}'

at error (project/node_modules/@adobe/css-tools/dist/src/parse/index.ts:79:17)
at declarations (project/node_modules/@adobe/css-tools/dist/src/parse/index.ts:350:14)
at rule (project/node_modules/@adobe/css-tools/dist/src/parse/index.ts:764:21)
at rules (project/node_modules/@adobe/css-tools/dist/src/parse/index.ts:134:71)
at stylesheet (project/node_modules/@adobe/css-tools/dist/src/parse/index.ts:98:23)
at Object.$b499486c7f02abe7$export$98e6a39c04603d36 (project/node_modules/@adobe/css-tools/dist/src/parse/index.ts:768:20)
at getCSS (project/node_modules/jest-styled-components/src/utils.js:42:26)

I created prs to fix the issue in several repositories:

  • https://github.com/rrweb-io/CSSOM/pull/1
  • https://github.com/rrweb-io/CSSOM/pull/4
  • https://github.com/jsdom/jsdom/pull/3707
  • https://github.com/jestjs/jest/pull/15089
  • https://github.com/adobe/css-tools/pull/319
  • https://github.com/testing-library/jest-dom/pull/602
  • https://github.com/styled-components/jest-styled-components/pull/446

Could you please take a look at the last one for jest-styled-components https://github.com/styled-components/jest-styled-components/pull/446

jantimon avatar Jun 05 '24 08:06 jantimon