Skip to content

Commit

Permalink
test(core): Added testing architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
ritz078 committed Dec 12, 2015
1 parent d58a340 commit d86e10a
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 10 deletions.
9 changes: 5 additions & 4 deletions GruntFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ module.exports = function (grunt) {
// Import package manifest
pkg: grunt.file.readJSON("package.json"),

projectName:"lunar",

// Banner definitions
meta: {
banner: "/*\n" +
Expand All @@ -28,17 +30,16 @@ module.exports = function (grunt) {
options: {
format : 'umd',
banner : "<%= meta.banner %>",
externals : ['regeneratorRuntime'],
sourceMap : true,
useStrict : true,
sourceMapFile: 'src/embed.js',
sourceMapFile: 'dist/<%= projectName %>.js',
plugins : [
babel()
]
},
files : {
src : 'src/lunar.js',
dest: 'dist/lunar.js'
src : 'src/<%= projectName %>.js',
dest: 'dist/<%= projectName %>.js'
}
}

Expand Down
4 changes: 2 additions & 2 deletions dist/lunar.js

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

2 changes: 1 addition & 1 deletion dist/lunar.js.map

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

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "rollup -c && mocha test/bundle.test.js"
},
"author": "",
"license": "MIT",
"devDependencies": {
"babel": "^6.3.13",
Expand All @@ -32,5 +31,9 @@
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
}
}
},
"author":{
"name":"Ritesh Kumar"
},
"homepage":"https://riteshkr.com/lunar"
}
12 changes: 12 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
var babel = require('rollup-plugin-babel');

var config = {
entry: 'test/index.test.js',
dest: 'test/bundle.test.js',
format: 'cjs',
plugins: [
babel()
]
};

module.exports = config;
2 changes: 2 additions & 0 deletions test/bundle.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'use strict';

1 change: 1 addition & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit d86e10a

Please sign in to comment.