mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 04:22:01 +00:00
* Add API for frameworks and examples * Adjust headers * Update frameworks list * Always use latest * Add types * Use now repo for downloading and listing * Use .existsSync * Remove unused packages * Use 307 for redirect * Add examples * Update tsconfig.json Co-Authored-By: Steven <steven@ceriously.com> * Make examples unique * Remove detectors from frameworks API * Use /api instead of Next.js * Install dependencies * Rename project * Change name * Empty * Change name * Update api/tsconfig.json Co-Authored-By: Steven <steven@ceriously.com> * Update examples Co-authored-by: Steven <steven@ceriously.com>
26 lines
567 B
JavaScript
26 lines
567 B
JavaScript
import jest from 'jest-cli';
|
|
import path from 'path';
|
|
import packageJson from '../../package.json';
|
|
|
|
import { CLIOptions } from 'aurelia-cli';
|
|
|
|
export default cb => {
|
|
let options = packageJson.jest;
|
|
|
|
if (CLIOptions.hasFlag('watch')) {
|
|
Object.assign(options, { watchAll: true });
|
|
}
|
|
|
|
process.env.BABEL_TARGET = 'node';
|
|
|
|
jest
|
|
.runCLI(options, [path.resolve(__dirname, '../../')])
|
|
.then(({ results }) => {
|
|
if (results.numFailedTests || results.numFailedTestSuites) {
|
|
cb('Tests Failed');
|
|
} else {
|
|
cb();
|
|
}
|
|
});
|
|
};
|