mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 06:51:10 +03:00
move unit tests
This commit is contained in:
parent
f9185b02b5
commit
05b4b875e2
@ -3,9 +3,9 @@ import 'angular';
|
||||
import 'angular-mocks';
|
||||
|
||||
// Import custom Angular module dependencies
|
||||
import '../src/i18n';
|
||||
import '../lib/services';
|
||||
import '../lib/components';
|
||||
import '../../src/i18n';
|
||||
import '../../lib/services';
|
||||
import '../../lib/components';
|
||||
|
||||
// Import tests
|
||||
import './panel-body.spec';
|
@ -11,7 +11,7 @@ module.exports = config => {
|
||||
reporters: ['progress'],
|
||||
files: [
|
||||
'./index.js',
|
||||
'../lib/components/**/*.html'
|
||||
'../../lib/components/**/*.html'
|
||||
],
|
||||
plugins: [
|
||||
'karma-webpack',
|
||||
@ -20,13 +20,13 @@ module.exports = config => {
|
||||
'karma-ng-html2js-preprocessor'
|
||||
],
|
||||
preprocessors: {
|
||||
'../lib/components/**/*.html': 'ng-html2js',
|
||||
'../../lib/components/**/*.html': 'ng-html2js',
|
||||
'./index.js': 'webpack'
|
||||
},
|
||||
ngHtml2JsPreprocessor: {
|
||||
moduleName: 'at.test.templates',
|
||||
cacheIdFromPath: function (filepath) {
|
||||
filepath = filepath.replace(path.join(__dirname, '../lib'), '');
|
||||
filepath = filepath.replace(path.join(__dirname, '../../lib'), '');
|
||||
return '/static/partials' + filepath;
|
||||
}
|
||||
},
|
@ -17,7 +17,7 @@ describe('Components | panel/body', () => {
|
||||
it('Should produce at-Panel-body HTML content', () => {
|
||||
let element = $compile('<at-panel-body>yo</at-panel-body>')($rootScope);
|
||||
$rootScope.$digest();
|
||||
|
||||
|
||||
expect(element.hasClass('at-Panel-body')).toBe(true);
|
||||
expect(element.html()).toContain('yo');
|
||||
});
|
@ -25,7 +25,7 @@
|
||||
"jshint": "grunt jshint:source --no-color",
|
||||
"test:ci": "npm run test -- --single-run --reporter junit,dots --browsers=PhantomJS",
|
||||
"lint": "./node_modules/.bin/eslint -c .eslintrc.js .",
|
||||
"component-test": "./node_modules/.bin/karma start client/test/karma.conf.js",
|
||||
"component-test": "./node_modules/.bin/karma start client/test/unit/karma.conf.js",
|
||||
"lint-dev": "./node_modules/.bin/nodemon --exec \"./node_modules/.bin/eslint -c .eslintrc.js .\" --watch \"client/components/**/*.js\"",
|
||||
"dev": "./node_modules/.bin/webpack --config build/webpack.development.js --progress",
|
||||
"watch": "./node_modules/.bin/webpack-dev-server --config build/webpack.watch.js --progress",
|
||||
@ -123,4 +123,4 @@
|
||||
"select2": "^4.0.2",
|
||||
"sprintf-js": "^1.0.3"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user