Commit 4c7dfada authored by Randall Leeds's avatar Randall Leeds

Remove sinon and chai boilerplate

parent 96047775
{inject, module} = require('angular-mock') {inject, module} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'h:AccountController', -> describe 'h:AccountController', ->
$scope = null $scope = null
fakeFlash = null fakeFlash = null
......
{inject, module} = require('angular-mock') {inject, module} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
sandbox = sinon.sandbox.create() sandbox = sinon.sandbox.create()
class MockSession class MockSession
......
bb = require('../bucket-bar') bb = require('../bucket-bar')
assert = chai.assert
sinon.assert.expose(assert, prefix: '')
describe 'Annotator.BucketBar', -> describe 'Annotator.BucketBar', ->
createBucketBar = (options) -> createBucketBar = (options) ->
element = document.createElement('div') element = document.createElement('div')
......
CrossFrame = require('../cross-frame') CrossFrame = require('../cross-frame')
assert = chai.assert
sinon.assert.expose(assert, prefix: '')
describe 'Annotator.Plugin.CrossFrame', -> describe 'Annotator.Plugin.CrossFrame', ->
fakeDiscovery = null fakeDiscovery = null
fakeBridge = null fakeBridge = null
......
Annotator = require('annotator') Annotator = require('annotator')
Host = require('../host') Host = require('../host')
assert = chai.assert
sinon.assert.expose(assert, prefix: '')
describe 'Host', -> describe 'Host', ->
sandbox = sinon.sandbox.create() sandbox = sinon.sandbox.create()
fakeCrossFrame = null fakeCrossFrame = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'match', -> describe 'match', ->
$compile = null $compile = null
$element = null $element = null
......
...@@ -2,9 +2,6 @@ var angularMock = require('angular-mock'); ...@@ -2,9 +2,6 @@ var angularMock = require('angular-mock');
var module = angularMock.module; var module = angularMock.module;
var inject = angularMock.inject; var inject = angularMock.inject;
var assert = chai.assert;
sinon.assert.expose(assert, {prefix: null});
describe('spinner', function () { describe('spinner', function () {
var $animate = null; var $animate = null;
var $element = null var $element = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'thread', -> describe 'thread', ->
$compile = null $compile = null
$element = null $element = null
......
...@@ -11,7 +11,8 @@ module.exports = function(config) { ...@@ -11,7 +11,8 @@ module.exports = function(config) {
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: [ frameworks: [
'browserify', 'browserify',
'mocha' 'mocha',
'chai-sinon'
], ],
// list of files / patterns to load in the browser // list of files / patterns to load in the browser
...@@ -38,8 +39,6 @@ module.exports = function(config) { ...@@ -38,8 +39,6 @@ module.exports = function(config) {
// Test deps // Test deps
'vendor/angular-mocks.js', 'vendor/angular-mocks.js',
'vendor/sinon.js',
'vendor/chai.js',
'../../templates/client/*.html', '../../templates/client/*.html',
// Tests // Tests
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose(assert, prefix: '')
describe 'annotationMapper', -> describe 'annotationMapper', ->
sandbox = sinon.sandbox.create() sandbox = sinon.sandbox.create()
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose(assert, prefix: '')
describe 'AnnotationSync', -> describe 'AnnotationSync', ->
sandbox = sinon.sandbox.create() sandbox = sinon.sandbox.create()
publish = null publish = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'AnnotationUIController', -> describe 'AnnotationUIController', ->
$scope = null $scope = null
$rootScope = null $rootScope = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose(assert, prefix: '')
describe 'AnnotationUISync', -> describe 'AnnotationUISync', ->
sandbox = sinon.sandbox.create() sandbox = sinon.sandbox.create()
$digest = null $digest = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose(assert, prefix: '')
describe 'annotationUI', -> describe 'annotationUI', ->
annotationUI = null annotationUI = null
......
{inject, module} = require('angular-mock') {inject, module} = require('angular-mock')
assert = chai.assert
describe "AnnotationViewerController", -> describe "AnnotationViewerController", ->
before -> before ->
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'AppController', -> describe 'AppController', ->
$controller = null $controller = null
$scope = null $scope = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'h', -> describe 'h', ->
fakeAnnotator = null fakeAnnotator = null
fakeIdentity = null fakeIdentity = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
Channel = require('jschannel') Channel = require('jschannel')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'Bridge', -> describe 'Bridge', ->
sandbox = sinon.sandbox.create() sandbox = sinon.sandbox.create()
bridge = null bridge = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'CrossFrame', -> describe 'CrossFrame', ->
sandbox = sinon.sandbox.create() sandbox = sinon.sandbox.create()
crossframe = null crossframe = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'Discovery', -> describe 'Discovery', ->
sandbox = sinon.sandbox.create() sandbox = sinon.sandbox.create()
fakeTopWindow = null fakeTopWindow = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'host', -> describe 'host', ->
sandbox = null sandbox = null
host = null host = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
sandbox = sinon.sandbox.create() sandbox = sinon.sandbox.create()
describe 'identityProvider', -> describe 'identityProvider', ->
provider = null provider = null
mockInjectable = {} mockInjectable = {}
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'localStorage', -> describe 'localStorage', ->
fakeWindow = null fakeWindow = null
sandbox = null sandbox = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'h:permissions', -> describe 'h:permissions', ->
sandbox = null sandbox = null
fakeAuth = null fakeAuth = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'searchFilter', -> describe 'searchFilter', ->
sandbox = null sandbox = null
searchFilter = null searchFilter = null
...@@ -66,4 +63,3 @@ describe 'searchFilter', -> ...@@ -66,4 +63,3 @@ describe 'searchFilter', ->
assert.equal(result.any[1], 'john:doe') assert.equal(result.any[1], 'john:doe')
assert.equal(result.any[2], 'hi-fi') assert.equal(result.any[2], 'hi-fi')
assert.equal(result.any[3], 'a:bc') assert.equal(result.any[3], 'a:bc')
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
var mock = require('angular-mock'); var mock = require('angular-mock');
var assert = chai.assert;
sinon.assert.expose(assert, {prefix: null});
describe('h:session', function () { describe('h:session', function () {
var $httpBackend; var $httpBackend;
var fakeFlash; var fakeFlash;
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'store', -> describe 'store', ->
$httpBackend = null $httpBackend = null
sandbox = null sandbox = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'StreamController', -> describe 'StreamController', ->
$controller = null $controller = null
$scope = null $scope = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'streamer', -> describe 'streamer', ->
WebSocket = null WebSocket = null
fakeSock = null fakeSock = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose(assert, prefix: '')
describe 'Threading', -> describe 'Threading', ->
instance = null instance = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose(assert, prefix: '')
describe 'unicode', -> describe 'unicode', ->
unicode = null unicode = null
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
poem = poem =
tiger: 'Tiger! Tiger! burning bright tiger: 'Tiger! Tiger! burning bright
In the forest of the night In the forest of the night
......
{module, inject} = require('angular-mock') {module, inject} = require('angular-mock')
assert = chai.assert
sinon.assert.expose assert, prefix: null
describe 'WidgetController', -> describe 'WidgetController', ->
$scope = null $scope = null
fakeAnnotationMapper = null fakeAnnotationMapper = null
......
This diff is collapsed.
This diff is collapsed.
...@@ -25,15 +25,19 @@ ...@@ -25,15 +25,19 @@
"uglify-js": "^2.4.14" "uglify-js": "^2.4.14"
}, },
"devDependencies": { "devDependencies": {
"chai": "^3.2.0",
"jscs": "^1.13.1", "jscs": "^1.13.1",
"karma": "^0.12.17", "karma": "^0.12.17",
"karma-browserify": "^3.0.3", "karma-browserify": "^3.0.3",
"karma-chai-sinon": "^0.1.5",
"karma-cli": "0.0.4", "karma-cli": "0.0.4",
"karma-mocha": "^0.1.4", "karma-mocha": "^0.1.4",
"karma-ng-html2js-preprocessor": "^0.1.0", "karma-ng-html2js-preprocessor": "^0.1.0",
"karma-phantomjs-launcher": "^0.1.4", "karma-phantomjs-launcher": "^0.1.4",
"mocha": "^1.20.1", "mocha": "^1.20.1",
"phantomjs": "^1.9.7" "phantomjs": "^1.9.7",
"sinon": "^1.15.4",
"sinon-chai": "^2.8.0"
}, },
"engines": { "engines": {
"node": "0.10.x" "node": "0.10.x"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment