Skip to content

Commit

Permalink
Scaffold: Switch to mocha and expect & update eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Dec 10, 2018
1 parent 2bb755d commit a3b4ef2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
@@ -1,3 +1,3 @@
{
"extends": "@phated/iceddev/es5"
"extends": "gulp"
}
14 changes: 7 additions & 7 deletions package.json
Expand Up @@ -15,18 +15,18 @@
"index.js"
],
"scripts": {
"test": "lab -cvL --globals store@sparkles"
"lint": "eslint .",
"pretest": "npm run lint",
"test": "mocha --async-only"
},
"dependencies": {
"sparkles": "^1.0.0"
},
"devDependencies": {
"@phated/eslint-config-iceddev": "^0.2.1",
"code": "^1.5.0",
"eslint": "^1.3.1",
"eslint-plugin-mocha": "^0.5.1",
"eslint-plugin-react": "^3.3.2",
"lab": "^5.16.0"
"eslint": "^1.7.3",
"eslint-config-gulp": "^2.1.0",
"expect": "^1.20.2",
"mocha": "^2.5.3"
},
"keywords": [
"global",
Expand Down
20 changes: 7 additions & 13 deletions test/index.js
@@ -1,12 +1,6 @@
'use strict';

var lab = exports.lab = require('lab').script();
var expect = require('code').expect;

var describe = lab.describe;
var it = lab.it;
var beforeEach = lab.beforeEach;
var afterEach = lab.afterEach;
var expect = require('expect');

var glogg = require('../');

Expand All @@ -26,7 +20,7 @@ describe('glogg', function(){

it('emits a debug event when debug method is called', function(done){
logger.on('debug', function(msg){
expect(msg).to.equal('test');
expect(msg).toEqual('test');
done();
});

Expand All @@ -35,7 +29,7 @@ describe('glogg', function(){

it('emits a info event when info method is called', function(done){
logger.on('info', function(msg){
expect(msg).to.equal('test');
expect(msg).toEqual('test');
done();
});

Expand All @@ -44,7 +38,7 @@ describe('glogg', function(){

it('emits a warn event when warn method is called', function(done){
logger.on('warn', function(msg){
expect(msg).to.equal('test');
expect(msg).toEqual('test');
done();
});

Expand All @@ -53,7 +47,7 @@ describe('glogg', function(){

it('emits a error event when error method is called', function(done){
logger.on('error', function(msg){
expect(msg).to.equal('test');
expect(msg).toEqual('test');
done();
});

Expand All @@ -62,7 +56,7 @@ describe('glogg', function(){

it('formats a string message with util.format syntax', function(done){
logger.on('debug', function(msg){
expect(msg).to.equal('test something');
expect(msg).toEqual('test something');
done();
});

Expand All @@ -73,7 +67,7 @@ describe('glogg', function(){
var expected = { test: 'something' };

logger.on('debug', function(msg){
expect(msg).to.deep.equal(expected);
expect(msg).toEqual(expected);
done();
});

Expand Down

0 comments on commit a3b4ef2

Please sign in to comment.