-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Merge pull request #229 from Turbo87/shimmer"
- Loading branch information
Showing
10 changed files
with
442 additions
and
179 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 @@ | ||
{ | ||
"directory": "bower_components", | ||
"analytics": false | ||
} |
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,6 @@ | ||
{ | ||
"name": "ember-cli-mocha", | ||
"dependencies": { | ||
"ember-cli-test-loader": "0.2.2" | ||
} | ||
} |
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,6 @@ | ||
<div id="mocha"></div> | ||
<div id="mocha-fixture"></div> | ||
|
||
<div id="ember-testing-container"> | ||
<div id="ember-testing"></div> | ||
</div> |
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,42 @@ | ||
import { describe, it, beforeEach, afterEach } from 'mocha'; | ||
import { expect } from 'chai'; | ||
|
||
describe('Unit | test-loader', function() { | ||
var TestLoader = window.require('ember-cli/test-loader')['default']; | ||
var originalRequire = window.require; | ||
var requiredModules; | ||
|
||
beforeEach(function() { | ||
requiredModules = []; | ||
|
||
window.require = (name) => { | ||
requiredModules.push(name); | ||
}; | ||
window.require.unsee = () => {}; | ||
|
||
window.requirejs.entries = { | ||
'valid-test': true, | ||
'valid_test': true, | ||
'valid.jshint.lint-test': true, | ||
'not-valid-jshint': true, | ||
'not-a-test-module': true, | ||
'nohyphentest': true | ||
}; | ||
}); | ||
|
||
afterEach(function() { | ||
window.require = originalRequire; | ||
}); | ||
|
||
it('loads properly suffixed modules', function() { | ||
TestLoader.load(); | ||
|
||
var expectedModules = [ | ||
'valid-test', | ||
'valid_test', | ||
'valid.jshint.lint-test' | ||
]; | ||
|
||
expect(requiredModules).to.deep.equal(expectedModules); | ||
}); | ||
}); |
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,14 @@ | ||
#ember-testing-container { | ||
position: fixed; | ||
background: white; | ||
bottom: 0; | ||
right: 0; | ||
width: 640px; | ||
height: 384px; | ||
overflow: auto; | ||
z-index: 9999; | ||
border: 1px solid #ccc; | ||
} | ||
#ember-testing { | ||
zoom: 50%; | ||
} |
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,31 @@ | ||
/* globals jQuery, chai, mocha, require, requirejs */ | ||
|
||
jQuery(document).ready(function() { | ||
var testLoaderModulePath = 'ember-cli-test-loader/test-support/index'; | ||
|
||
if (!requirejs.entries[testLoaderModulePath]) { | ||
testLoaderModulePath = 'ember-cli/test-loader'; | ||
} | ||
|
||
var TestLoader = require(testLoaderModulePath)['default']; | ||
TestLoader.prototype.shouldLoadModule = function(moduleName) { | ||
return moduleName.match(/[-_]test$/) || moduleName.match(/\.jshint$/); | ||
}; | ||
|
||
TestLoader.prototype.moduleLoadFailure = function(moduleName, error) { | ||
describe('TestLoader Failures', function () { | ||
it(moduleName + ': could not be loaded', function() { | ||
throw error; | ||
}); | ||
}); | ||
}; | ||
|
||
// Attempt to mitigate sourcemap issues in Chrome | ||
// See: https:/ember-cli/ember-cli/issues/3098 | ||
// https:/ember-cli/ember-cli-qunit/pull/39 | ||
setTimeout(function() { | ||
TestLoader.load(); | ||
|
||
window.mochaRunner = mocha.run(); | ||
}, 250); | ||
}); |
Oops, something went wrong.