mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-28 20:40:06 +00:00
companion: make npm run test work on windows (#2399)
This commit is contained in:
parent
72b52013e1
commit
52e5fc062b
2 changed files with 15 additions and 1 deletions
|
|
@ -86,7 +86,7 @@
|
|||
"deploy": "kubectl apply -f infra/kube/companion-kube.yml",
|
||||
"prepublishOnly": "npm run build",
|
||||
"start": "node ./lib/standalone/start-server.js",
|
||||
"test": "bash -c 'npm run build && source env.test.sh && jest'",
|
||||
"test": "node test/run",
|
||||
"test:watch": "npm test -- --watch"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
|||
14
packages/@uppy/companion/test/run.js
Normal file
14
packages/@uppy/companion/test/run.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env node
|
||||
const { execSync } = require('child_process')
|
||||
const path = require('path')
|
||||
|
||||
process.chdir(path.join(__dirname, '..'))
|
||||
try {
|
||||
execSync('jest --version', { shell: 'bash' })
|
||||
} catch (err) {
|
||||
console.error('could not start jest, make sure this script is ran using `npm test`')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
execSync('npm run build', { stdio: 'inherit' })
|
||||
execSync('source env.test.sh && jest', { shell: 'bash', stdio: 'inherit' })
|
||||
Loading…
Add table
Add a link
Reference in a new issue