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

Npm update #379

Open
wants to merge 3 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 9 additions & 35 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 12 additions & 21 deletions integration-tests/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* ------------------------------------------------------------------------------------------ */

import * as path from 'path'
import glob from 'glob'
import Mocha from 'mocha'
import { glob } from 'glob'

export async function run (): Promise<void> {
const mocha = new Mocha({
Expand All @@ -14,27 +14,18 @@ export async function run (): Promise<void> {
})
const testsRoot = path.resolve(__dirname, '../..')

await new Promise((_resolve, _reject) => {
glob('**/integration-tests/**/**.test.js', { cwd: testsRoot }, (err, files) => {
if (err !== undefined && err !== null) {
_reject(err); return
}
const files: string[] = await glob('**/integration-tests/**/**.test.js', { cwd: testsRoot })

// Add files to the test suite
files.forEach(f => mocha.addFile(path.resolve(testsRoot, f)))
// Add files to the test suite
files.forEach(f => mocha.addFile(path.resolve(testsRoot, f)))

try {
// Run the mocha test
mocha.run(failures => {
if (failures > 0) {
_reject(new Error(`${failures} tests failed.`))
} else {
_resolve('All tests passed.')
}
})
} catch (err) {
_reject(err)
}
})
// Run the mocha test
mocha.run(failures => {
if (failures > 0) {
throw new Error('Tests failed: ' + failures)
} else {
// Say that the tests passed
console.log('All tests passed.')
}
})
}
Loading
Loading