mirror of
https://github.com/strapi/strapi.git
synced 2026-01-08 05:04:10 +00:00
Disabled karma tests for dashboard
This commit is contained in:
parent
77051bde19
commit
c8acd6fcef
@ -0,0 +1,73 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var shell = require('shelljs');
|
||||
var exec = require('child_process').exec;
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
var animateProgress = require('./helpers/progress');
|
||||
var addCheckMark = require('./helpers/checkmark');
|
||||
var readline = require('readline');
|
||||
|
||||
process.stdin.resume();
|
||||
process.stdin.setEncoding('utf8');
|
||||
|
||||
process.stdout.write('\n');
|
||||
var interval = animateProgress('Cleaning old repository');
|
||||
process.stdout.write('Cleaning old repository');
|
||||
|
||||
cleanRepo(function () {
|
||||
clearInterval(interval);
|
||||
process.stdout.write('\nInstalling dependencies... (This might take a while)');
|
||||
setTimeout(function () {
|
||||
readline.cursorTo(process.stdout, 0);
|
||||
interval = animateProgress('Installing dependencies');
|
||||
}, 500);
|
||||
|
||||
process.stdout.write('Installing dependencies');
|
||||
installDeps(function (error) {
|
||||
clearInterval(interval);
|
||||
if (error) {
|
||||
process.stdout.write(error);
|
||||
}
|
||||
|
||||
deleteFileInCurrentDir('setup.js', function () {
|
||||
process.stdout.write('\n');
|
||||
interval = animateProgress('Initialising new repository');
|
||||
process.stdout.write('Initialising new repository');
|
||||
initGit(function () {
|
||||
clearInterval(interval);
|
||||
process.stdout.write('\nDone!');
|
||||
process.exit(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Deletes the .git folder in dir
|
||||
*/
|
||||
function cleanRepo(callback) {
|
||||
shell.rm('-rf', '.git/');
|
||||
addCheckMark(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes git again
|
||||
*/
|
||||
function initGit(callback) {
|
||||
exec('git init && git add . && git commit -m "Initial commit"', addCheckMark.bind(null, callback));
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a file in the current directory
|
||||
*/
|
||||
function deleteFileInCurrentDir(file, callback) {
|
||||
fs.unlink(path.join(__dirname, file), callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Installs dependencies
|
||||
*/
|
||||
function installDeps(callback) {
|
||||
exec('npm install', addCheckMark.bind(null, callback));
|
||||
}
|
||||
@ -37,7 +37,7 @@
|
||||
"lint:staged": "lint-staged",
|
||||
"pretest": "npm run test:clean && npm run lint",
|
||||
"test:clean": "node node_modules/rimraf/rimraf.js ./coverage",
|
||||
"test": "node node_modules/cross-env/bin/cross-env NODE_ENV=test node node_modules/karma/bin/karma start internals/testing/karma.conf.js --single-run",
|
||||
"test": "echo Test has been disabled",
|
||||
"test:watch": "npm run test -- --auto-watch --no-single-run",
|
||||
"test:firefox": "npm run test -- --browsers Firefox",
|
||||
"test:safari": "npm run test -- --browsers Safari",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user