mirror of
https://github.com/owncast/owncast.git
synced 2024-11-21 12:18:02 +03:00
fix(test): fix javascript tests not running
This commit is contained in:
parent
742df5322f
commit
df3a9424b1
4 changed files with 37 additions and 3 deletions
|
@ -44,6 +44,8 @@
|
|||
"@storybook/cli",
|
||||
"@storybook/mdx2-csf",
|
||||
"@commitlint/cli",
|
||||
"@commitlint/config-conventional"
|
||||
"@commitlint/config-conventional",
|
||||
"babel-plugin-dynamic-import-node",
|
||||
"@babel/preset-react"
|
||||
]
|
||||
}
|
|
@ -1,5 +1,24 @@
|
|||
module.exports = {
|
||||
transform: { '^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { presets: ['next/babel'] }] },
|
||||
transform: {
|
||||
'^.+\\.(js|jsx|ts|tsx)$': [
|
||||
'babel-jest',
|
||||
{
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
node: 'current',
|
||||
},
|
||||
},
|
||||
],
|
||||
'@babel/preset-react',
|
||||
'@babel/preset-typescript',
|
||||
],
|
||||
plugins: ['dynamic-import-node'],
|
||||
},
|
||||
],
|
||||
},
|
||||
testEnvironment: 'node',
|
||||
testRegex: '/tests/.*\\.(test|spec)?\\.(ts|tsx)$',
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
||||
|
|
11
web/package-lock.json
generated
11
web/package-lock.json
generated
|
@ -22,6 +22,7 @@
|
|||
"@xstate/react": "3.2.2",
|
||||
"antd": "4.24.16",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"babel-plugin-dynamic-import-node": "^2.3.3",
|
||||
"chart.js": "^4.2.0",
|
||||
"classnames": "2.5.1",
|
||||
"date-fns": "^3.0.0",
|
||||
|
@ -55,6 +56,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.25.8",
|
||||
"@babel/preset-react": "^7.25.7",
|
||||
"@commitlint/cli": "^19.3.0",
|
||||
"@commitlint/config-conventional": "^19.2.2",
|
||||
"@mdx-js/react": "3.0.1",
|
||||
|
@ -13471,6 +13473,15 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/babel-plugin-dynamic-import-node": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz",
|
||||
"integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"object.assign": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/babel-plugin-istanbul": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz",
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
"@xstate/react": "3.2.2",
|
||||
"antd": "4.24.16",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"babel-plugin-dynamic-import-node": "^2.3.3",
|
||||
"chart.js": "^4.2.0",
|
||||
"classnames": "2.5.1",
|
||||
"date-fns": "^3.0.0",
|
||||
|
@ -64,6 +65,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.25.8",
|
||||
"@babel/preset-react": "^7.25.7",
|
||||
"@commitlint/cli": "^19.3.0",
|
||||
"@commitlint/config-conventional": "^19.2.2",
|
||||
"@mdx-js/react": "3.0.1",
|
||||
|
|
Loading…
Reference in a new issue