-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
language: node_js | ||
node_js: | ||
- "4.1" | ||
- "4.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
'use strict' | ||
const Mocha = require('mocha') | ||
const fs = require('fs') | ||
const path = require('path') | ||
|
||
// Instantiate a Mocha instance. | ||
var mocha = new Mocha() | ||
|
||
var testDir = 'test' | ||
require('babel/register')({ | ||
ignore: false | ||
}) | ||
// Add each .js file to the mocha instance | ||
fs.readdirSync(testDir).filter(function (file) { | ||
// Only keep the .js files | ||
return file.substr(-3) === '.js' | ||
}).forEach(function (file) { | ||
mocha.addFile(path.join(testDir, file)) | ||
}) | ||
|
||
// Run the tests. | ||
mocha.run(function (failures) { | ||
process.on('exit', function () { | ||
process.exit(failures) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* eslint-env node, mocha */ | ||
import HotReloader from '../jspm-hot-reloader' | ||
import {expect} from 'chai' | ||
describe('jspm-hot-reloader', function () { | ||
let hr | ||
it('should listen to socket.io and call hotReload on itself, when a change event comes', () => { | ||
hr = new HotReloader('') | ||
hr.on('change', (file) => { | ||
expect(file).to.equal(file) | ||
}) | ||
}) | ||
|
||
it('should revert back the tree if some import during hotReload fails', () => { | ||
|
||
}) | ||
|
||
after(() => { | ||
hr.socket.disconnect() | ||
}) | ||
}) |