forked from pviswanathan/ChromeAutoTextExpander
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Carlin
committed
Jun 28, 2019
1 parent
a39f947
commit 7fb20c2
Showing
7 changed files
with
268 additions
and
10 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,11 +1,26 @@ | ||
// Browser-based tests | ||
|
||
(function () { | ||
'use strict'; | ||
|
||
describe('Give it some context', function () { | ||
describe('maybe a bit more context here', function () { | ||
it('should run here few assertions', function () { | ||
console.log('Browser-based Tests'); | ||
|
||
describe('initialization', function() { | ||
describe('jquery init', function() { | ||
it('should be available as a function', function() { | ||
expect(typeof window.jQuery).to.equal('function'); | ||
}); | ||
}); | ||
describe('moment init', function() { | ||
it('should be available as a function', function() { | ||
expect(typeof window.moment).to.equal('function'); | ||
}); | ||
}); | ||
describe('constants init', function() { | ||
it('should have PROD chrome extension ID', function() { | ||
expect(APP_ID_PRODUCTION).to.equal('iibninhmiggehlcdolcilmhacighjamp'); | ||
}); | ||
}); | ||
}); | ||
|
||
})(); |
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,28 @@ | ||
// Nodejs tests | ||
|
||
(function () { | ||
'use strict'; | ||
|
||
console.log('Nodejs Tests'); | ||
|
||
var chai = require('chai') | ||
var assert = chai.assert; | ||
var expect = chai.expect; | ||
var should = chai.should(); | ||
|
||
// Mock out chrome APIs | ||
const chrome = require('sinon-chrome'); | ||
|
||
describe('Background.js', function() { | ||
|
||
// Mock out Chrome's extension APIs | ||
before(function () { global.chrome = chrome; }); | ||
|
||
describe('#indexOf()', function() { | ||
it('should return -1 when the value is not present', function() { | ||
assert.equal([1, 2, 3].indexOf(4), -1); | ||
}); | ||
}); | ||
}); | ||
|
||
})(); |