Move to jest for testing (#278)
* chore(package): update core-js to version 3.0.1 Closes #275 * move to jestpull/282/head
parent
d0bd0413fd
commit
8962f8087b
@ -1,5 +1,13 @@
|
||||
{
|
||||
"presets": [
|
||||
"@babel/preset-env"
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"targets": {
|
||||
"browsers": "> 1%, not dead, not IE < 11, not OperaMini all",
|
||||
"node": "current"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,22 +1,9 @@
|
||||
const gulp = require('gulp');
|
||||
const mochaPhantomJS = require('gulp-mocha-phantomjs');
|
||||
const config = require('../config');
|
||||
const shell = require('gulp-shell');
|
||||
|
||||
module.exports = function test() {
|
||||
return gulp.src('test/runner.html', {
|
||||
return gulp.src('package.json', {
|
||||
read: false,
|
||||
})
|
||||
.pipe(mochaPhantomJS({
|
||||
phantomjs: {
|
||||
useColors: true,
|
||||
},
|
||||
}))
|
||||
|
||||
// https://github.com/gulpjs/gulp/issues/259#issuecomment-61976830
|
||||
.on('error', function onerror(err) {
|
||||
if (config.watch) {
|
||||
console.error(err.message);
|
||||
this.emit('end');
|
||||
}
|
||||
});
|
||||
.pipe(shell(['npx jest']));
|
||||
};
|
||||
|
@ -0,0 +1,26 @@
|
||||
module.exports = {
|
||||
// Automatically clear mock calls and instances between every test
|
||||
clearMocks: true,
|
||||
|
||||
// The directory where Jest should output its coverage files
|
||||
coverageDirectory: 'coverage',
|
||||
|
||||
// An array of regexp pattern strings used to skip coverage collection
|
||||
coveragePathIgnorePatterns: [
|
||||
'/node_modules/',
|
||||
'/test/',
|
||||
],
|
||||
|
||||
// A list of reporter names that Jest uses when writing coverage reports
|
||||
coverageReporters: [
|
||||
'text',
|
||||
'lcov',
|
||||
],
|
||||
|
||||
// An array of regexp pattern strings that are matched against all test paths,
|
||||
// matched tests are skipped
|
||||
testPathIgnorePatterns: [
|
||||
'<rootDir>/gulp/',
|
||||
'/node_modules/',
|
||||
],
|
||||
};
|
@ -1,12 +0,0 @@
|
||||
<div id="delimiter">
|
||||
<div class="item" id="item1" data-groups='design,red'>Person 1</div>
|
||||
<div class="item" id="item2" data-groups='design,blue'>Person 2</div>
|
||||
<div class="item" id="item3" data-groups='strategy,green'>Person 3</div>
|
||||
<div class="item" id="item4" data-groups='ux,green'>Person 4</div>
|
||||
<div class="item" id="item5" data-groups='ux,blue'>Person 5</div>
|
||||
<div class="item" id="item6" data-groups='ux,red'>Person 6</div>
|
||||
<div class="item" id="item7" data-groups='newbiz'>Person 7</div>
|
||||
<div class="item" id="item8" data-groups='technology,black'>Person 8</div>
|
||||
<div class="item" id="item9" data-groups='design,red'>Person 9</div>
|
||||
<div class="item" id="item10" data-groups='technology,black'>Person 10</div>
|
||||
</div>
|
@ -1,31 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Mocha Tests</title>
|
||||
<link href="../node_modules/mocha/mocha.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
|
||||
<!-- Polyfills -->
|
||||
<script src="../node_modules/core-js/client/shim.min.js"></script>
|
||||
|
||||
<!-- Testing Framework -->
|
||||
<script src="../node_modules/mocha/mocha.js"></script>
|
||||
<script src="../node_modules/chai/chai.js"></script>
|
||||
<script src="../node_modules/chai-dom/chai-dom.js"></script>
|
||||
<script src="../node_modules/sinon/pkg/sinon.js"></script>
|
||||
|
||||
<!-- Source -->
|
||||
<script src="../dist/shuffle.js"></script>
|
||||
|
||||
<script>mocha.setup('bdd')</script>
|
||||
<script src="test.js"></script>
|
||||
|
||||
<script>
|
||||
mocha.checkLeaks();
|
||||
mocha.globals([]);
|
||||
mocha.run();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue