Skip to content

Commit d86e10a

Browse files
committed
test(core): Added testing architecture
1 parent d58a340 commit d86e10a

File tree

7 files changed

+29
-10
lines changed

7 files changed

+29
-10
lines changed

GruntFile.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ module.exports = function (grunt) {
77
// Import package manifest
88
pkg: grunt.file.readJSON("package.json"),
99

10+
projectName:"lunar",
11+
1012
// Banner definitions
1113
meta: {
1214
banner: "/*\n" +
@@ -28,17 +30,16 @@ module.exports = function (grunt) {
2830
options: {
2931
format : 'umd',
3032
banner : "<%= meta.banner %>",
31-
externals : ['regeneratorRuntime'],
3233
sourceMap : true,
3334
useStrict : true,
34-
sourceMapFile: 'src/embed.js',
35+
sourceMapFile: 'dist/<%= projectName %>.js',
3536
plugins : [
3637
babel()
3738
]
3839
},
3940
files : {
40-
src : 'src/lunar.js',
41-
dest: 'dist/lunar.js'
41+
src : 'src/<%= projectName %>.js',
42+
dest: 'dist/<%= projectName %>.js'
4243
}
4344
}
4445

dist/lunar.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lunar.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "rollup -c && mocha test/bundle.test.js"
88
},
9-
"author": "",
109
"license": "MIT",
1110
"devDependencies": {
1211
"babel": "^6.3.13",
@@ -32,5 +31,9 @@
3231
"commitizen": {
3332
"path": "node_modules/cz-conventional-changelog"
3433
}
35-
}
34+
},
35+
"author":{
36+
"name":"Ritesh Kumar"
37+
},
38+
"homepage":"http://riteshkr.com/lunar"
3639
}

rollup.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
var babel = require('rollup-plugin-babel');
2+
3+
var config = {
4+
entry: 'test/index.test.js',
5+
dest: 'test/bundle.test.js',
6+
format: 'cjs',
7+
plugins: [
8+
babel()
9+
]
10+
};
11+
12+
module.exports = config;

test/bundle.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
'use strict';
2+

test/index.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy