mirror of
https://github.com/ansible/awx.git
synced 2026-05-21 07:47:44 -02:30
Use broccoli to build tests
This commit is contained in:
33
awx/ui/static/lib/ember-cli-test-loader/.bower.json
Normal file
33
awx/ui/static/lib/ember-cli-test-loader/.bower.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "ember-cli-test-loader",
|
||||
"main": "test-loader.js",
|
||||
"version": "0.1.0",
|
||||
"homepage": "https://github.com/rjackson/ember-cli-test-loader",
|
||||
"description": "Test loader for Ember CLI projects.",
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"authors": [
|
||||
"Robert Jackson <robert.w.jackson@me.com>"
|
||||
],
|
||||
"moduleType": [
|
||||
"globals"
|
||||
],
|
||||
"keywords": [
|
||||
"ember-cli"
|
||||
],
|
||||
"_release": "0.1.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.1.0",
|
||||
"commit": "c6006a11515c756d115bb5209103a22c2e9554a0"
|
||||
},
|
||||
"_source": "git://github.com/ember-cli/ember-cli-test-loader.git",
|
||||
"_target": "0.1.0",
|
||||
"_originalSource": "ember-cli/ember-cli-test-loader"
|
||||
}
|
||||
19
awx/ui/static/lib/ember-cli-test-loader/README.md
Normal file
19
awx/ui/static/lib/ember-cli-test-loader/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
## Ember CLI Test Loader
|
||||
|
||||
Defines a `TestLoader` object that reviews all of the modules in
|
||||
`requirejs.entries` and loads those identified as tests.
|
||||
|
||||
`TestLoader.prototype.shouldLoadModule` can be overridden in order to customize
|
||||
the criteria for identifying test modules.
|
||||
|
||||
### Usage
|
||||
|
||||
Within your test suite:
|
||||
|
||||
```javascript
|
||||
var TestLoader = require('ember-cli/test-loader')['default'];
|
||||
|
||||
// optionally override TestLoader.prototype.shouldLoadModule
|
||||
|
||||
TestLoader.load();
|
||||
```
|
||||
24
awx/ui/static/lib/ember-cli-test-loader/bower.json
Normal file
24
awx/ui/static/lib/ember-cli-test-loader/bower.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "ember-cli-test-loader",
|
||||
"main": "test-loader.js",
|
||||
"version": "0.1.0",
|
||||
"homepage": "https://github.com/rjackson/ember-cli-test-loader",
|
||||
"description": "Test loader for Ember CLI projects.",
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"authors": [
|
||||
"Robert Jackson <robert.w.jackson@me.com>"
|
||||
],
|
||||
"moduleType": [
|
||||
"globals"
|
||||
],
|
||||
"keywords": [
|
||||
"ember-cli"
|
||||
]
|
||||
}
|
||||
36
awx/ui/static/lib/ember-cli-test-loader/test-loader.js
Normal file
36
awx/ui/static/lib/ember-cli-test-loader/test-loader.js
Normal file
@@ -0,0 +1,36 @@
|
||||
/* globals requirejs, require */
|
||||
(function() {
|
||||
define("ember-cli/test-loader",
|
||||
[],
|
||||
function() {
|
||||
"use strict";
|
||||
|
||||
var TestLoader = function() {
|
||||
};
|
||||
|
||||
TestLoader.prototype = {
|
||||
shouldLoadModule: function(moduleName) {
|
||||
return (moduleName.match(/[-_]test$/));
|
||||
},
|
||||
|
||||
loadModules: function() {
|
||||
var moduleName;
|
||||
|
||||
for (moduleName in requirejs.entries) {
|
||||
if (this.shouldLoadModule(moduleName)) {
|
||||
require(moduleName);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
TestLoader.load = function() {
|
||||
new TestLoader().loadModules();
|
||||
};
|
||||
|
||||
return {
|
||||
'default': TestLoader
|
||||
}
|
||||
}
|
||||
);
|
||||
})();
|
||||
Reference in New Issue
Block a user