carbon-design-system / carbon-web-components

Carbon Design System variant on top of Web Components
https://web-components.carbondesignsystem.com/
Apache License 2.0
478 stars 81 forks source link

Unit tests fail to run locally #951

Closed emyarod closed 2 years ago

emyarod commented 2 years ago

Description

discovered while debugging CI issues in https://github.com/carbon-design-system/carbon-web-components/runs/5159001396?check_suite_focus=true

running yarn test:unit seems to generate hundreds of untracked .d.ts files and fails with the following messages:

11 02 2022 10:21:10.554:ERROR [karma-server]: Error during file loading or preprocessing
TypeError: Cannot read property 'split' of undefined
    at /Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/karma-sourcemap-loader/index.js:56:25
    at executeProcessor (/Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/karma/lib/preprocessor.js:47:11)
    at runProcessors (/Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/karma/lib/preprocessor.js:60:23)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async FileList.preprocess [as _preprocess] (/Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/karma/lib/preprocessor.js:106:5)
    at async Promise.all (index 0)
    at async /Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/karma/lib/file-list.js:90:11
    at async Promise.all (index 7)
(node:90211) [log4js-node-DEP0004] DeprecationWarning: Pattern %d{DATE} is deprecated due to the confusion it causes when used. Please use %d{DATETIME} instead.
11 02 2022 10:21:10.555:INFO [karma-server]: Karma v6.3.9 server started at http://localhost:9876/
11 02 2022 10:21:10.555:INFO [launcher]: Launching browsers ChromeHeadless with concurrency unlimited
(node:90211) [log4js-node-DEP0004] DeprecationWarning: Pattern %d{DATE} is deprecated due to the confusion it causes when used. Please use %d{DATETIME} instead.
(node:90211) [log4js-node-DEP0004] DeprecationWarning: Pattern %d{DATE} is deprecated due to the confusion it causes when used. Please use %d{DATETIME} instead.
11 02 2022 10:21:10.557:ERROR [karma-server]: UnhandledRejection: Error: ENOENT: no such file or directory, open '/var/folders/f9/_mjqv9qs41b5gjhb36fy8rwh0000gn/T/_karma_webpack_215970/../../../../../../Users/emyarod/Documents/GitHub/public/carbon-web-components/.storybook/addon-carbon-theme/components/Panel.d.ts'
    at Object.openSync (fs.js:497:3)
    at Object.readFileSync (fs.js:393:35)
    at /Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/karma-webpack/lib/webpack/plugin.js:20:66
    at Array.forEach (<anonymous>)
    at /Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/karma-webpack/lib/webpack/plugin.js:16:29
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/tapable/lib/Hook.js:154:20)
    at /Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/webpack/lib/Compiler.js:304:22
    at Compiler.emitRecords (/Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/webpack/lib/Compiler.js:499:39)
    at /Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/webpack/lib/Compiler.js:298:10
11 02 2022 10:21:10.557:ERROR [karma-server]: Error: ENOENT: no such file or directory, open '/var/folders/f9/_mjqv9qs41b5gjhb36fy8rwh0000gn/T/_karma_webpack_215970/../../../../../../Users/emyarod/Documents/GitHub/public/carbon-web-components/.storybook/addon-carbon-theme/components/Panel.d.ts'
    at Object.openSync (fs.js:497:3)
    at Object.readFileSync (fs.js:393:35)
    at /Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/karma-webpack/lib/webpack/plugin.js:20:66
    at Array.forEach (<anonymous>)
    at /Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/karma-webpack/lib/webpack/plugin.js:16:29
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/tapable/lib/Hook.js:154:20)
    at /Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/webpack/lib/Compiler.js:304:22
    at Compiler.emitRecords (/Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/webpack/lib/Compiler.js:499:39)
    at /Users/emyarod/Documents/GitHub/public/carbon-web-components/node_modules/webpack/lib/Compiler.js:298:10 {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/var/folders/f9/_mjqv9qs41b5gjhb36fy8rwh0000gn/T/_karma_webpack_215970/../../../../../../Users/emyarod/Documents/GitHub/public/carbon-web-components/.storybook/addon-carbon-theme/components/Panel.d.ts'
}
(node:90211) [log4js-node-DEP0004] DeprecationWarning: Pattern %d{DATE} is deprecated due to the confusion it causes when used. Please use %d{DATETIME} instead.
(node:90211) [log4js-node-DEP0004] DeprecationWarning: Pattern %d{DATE} is deprecated due to the confusion it causes when used. Please use %d{DATETIME} instead.
[10:21:10] 'test:unit' errored after 58 s

Component(s) impacted

-

Browser

No response

Carbon Web Components version

canary

Severity

Severity 2 = Aspects of design is broken, and impedes users in a significant way, but there is a way to complete their tasks. Affects major functionality, has a workaround.

Application/website

-

CodeSandbox example

-

Steps to reproduce the issue (if applicable)

No response

Release date (if applicable)

No response

Code of Conduct

emyarod commented 2 years ago

should be resolved by #960 #964