Skip to content

Commit

Permalink
rewrite test helpers from LiveScript to JavaScript
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Oct 29, 2017
1 parent 4359e0d commit 9e9c086
Show file tree
Hide file tree
Showing 36 changed files with 575 additions and 447 deletions.
15 changes: 14 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';
const build = require('./build');
const fs = require('fs');
const path = require('path');
const config = require('./build/config');
module.exports = grunt => {
grunt.loadNpmTasks('grunt-contrib-clean');
Expand All @@ -9,6 +10,7 @@ module.exports = grunt => {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-livescript');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-webpack');
grunt.initConfig({
pkg: grunt.file.readJSON('./package.json'),
uglify: {
Expand Down Expand Up @@ -36,7 +38,6 @@ module.exports = grunt => {
livescript: {
src: {
files: {
'./tests/helpers.js': './tests/helpers/*',
'./tests/tests.js': './tests/tests/*',
'./tests/library.js': './tests/library/*',
},
Expand Down Expand Up @@ -87,6 +88,18 @@ module.exports = grunt => {
files: ['client/library.js', 'tests/helpers.js', 'tests/library.js'].map(it => ({ src: it })),
},
},
webpack: {
options: {
stats: false,
output: {
path: path.resolve(__dirname, 'tests'),
},
},
helpers: {
entry: './tests/helpers/index.js',
output: { filename: 'helpers.js' },
},
},
});
grunt.registerTask('build', function (options) {
const done = this.async();
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"grunt-contrib-watch": "^1.0.0",
"grunt-karma": "^2.0.0",
"grunt-livescript": "0.6.x",
"grunt-webpack": "^3.0.2",
"karma": "^1.7.1",
"karma-qunit": "1.2.x",
"karma-chrome-launcher": "^2.2.0",
Expand All @@ -36,7 +37,7 @@
"lint": "eslint ./",
"promises-tests": "promises-aplus-tests tests/promises-aplus/adapter",
"observables-tests": "node tests/observables/adapter && node tests/observables/adapter-library",
"test": "npm run grunt clean copy && npm run lint && npm run grunt livescript client karma:default && npm run grunt library karma:library && npm run promises-tests && npm run observables-tests && node tests/commonjs"
"test": "npm run grunt clean copy && npm run lint && npm run grunt webpack livescript client karma:default && npm run grunt library karma:library && npm run promises-tests && npm run observables-tests && node tests/commonjs"
},
"license": "MIT",
"keywords": [
Expand Down
Loading

0 comments on commit 9e9c086

Please sign in to comment.