Skip to content

Commit 881fac7

Browse files
committed
Fix package structure
1 parent 2f15a25 commit 881fac7

File tree

5 files changed

+65
-8
lines changed

5 files changed

+65
-8
lines changed

Diff for: index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@
55
*
66
*/
77

8-
const Commitground = require('./src/Commitground');
9-
10-
module.exports = Commitground;
8+
module.exports = require('./src/Commitground');

Diff for: package-lock.json

+53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
},
2121
"homepage": "https://github.com/commitground/commitground-js#readme",
2222
"devDependencies": {
23+
"chai": "^4.1.2",
2324
"eslint": "^4.19.1",
2425
"eslint-config-airbnb-base": "^12.1.0",
2526
"eslint-plugin-import": "^2.12.0",

Diff for: src/Commitground.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const Commitground = {
2+
hello: () => 'world',
3+
};
4+
5+
module.exports = Commitground;

Diff for: test/test.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
var assert = require('assert');
2-
var commitground = require('commitground');
1+
var assert = require('chai').assert;
2+
var commitground = require('../index.js');
33

4-
describe('Suite of test', function() {
5-
it('should be passed', function() {
6-
assert.ok(true)
4+
describe('hello()', function() {
5+
it('should return "world"', function() {
6+
assert(commitground.hello() === 'world', 'Passed Hello world test')
77
})
88
})

0 commit comments

Comments
 (0)