Skip to content

Commit

Permalink
Merge pull request #14 from domdinnes/js-port
Browse files Browse the repository at this point in the history
Changed tests from CoffeeScript to JavaScript
  • Loading branch information
stephenyeargin authored Mar 3, 2018
2 parents 4881ee3 + f386984 commit c09aeea
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- "0.11"
- "0.10"
- "8"
- "6"
notifications:
email: false
7 changes: 3 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ module.exports = function(grunt) {
mochaTest: {
test: {
options: {
reporter: 'spec',
require: 'coffee-script'
reporter: 'spec'
},
src: ['test/**/*.coffee']
src: ['test/**/*.js']
}
},
release: {
Expand All @@ -22,7 +21,7 @@ module.exports = function(grunt) {
}
},
watch: {
files: ['Gruntfile.js', 'test/**/*.coffee'],
files: ['Gruntfile.js', 'test/**/*.js'],
tasks: ['test']
}
});
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,17 @@
},
"devDependencies": {
"chai": "^2.1.1",
"coffee-script": "1.6.3",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-contrib-watch": "~0.6.1",
"grunt-mocha-test": "~0.12.7",
"grunt-release": "~0.11.0",
"hubot": "2.x",
"matchdep": "~0.3.0",
"mocha": "^2.1.0",
"sinon": "^1.13.0",
"sinon-chai": "^2.7.0"
},
"main": "index.coffee",
"main": "index.js",
"scripts": {
"test": "grunt test"
}
Expand Down
2 changes: 1 addition & 1 deletion script/test
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# bootstrap environment
source script/bootstrap

mocha --compilers coffee:coffee-script
mocha
16 changes: 0 additions & 16 deletions test/youtube-test.coffee

This file was deleted.

19 changes: 19 additions & 0 deletions test/youtube-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
var chai = require('chai');
var sinon = require('sinon');
chai.use(require('sinon-chai'));

var expect = chai.expect;

describe('youtube', function() {
beforeEach(function() {
this.robot = {
respond: sinon.spy(),
hear: sinon.spy(),
};
require('../src/youtube')(this.robot);
});

it('registers a respond listener', function() {
expect(this.robot.respond).to.have.been.calledWith(/(?:youtube|yt)(?: me)? (.*)/i);
});
});

0 comments on commit c09aeea

Please sign in to comment.