switched to running tests using karma-typescript

This commit is contained in:
alecmerdler 2017-01-19 02:10:00 -08:00
parent 8a9a2972ec
commit bee504d0ba
5 changed files with 10 additions and 13 deletions

View file

@ -4,7 +4,7 @@ var webpackConfig = require('./webpack.config');
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
frameworks: ['jasmine', 'karma-typescript'],
files: [
// CDN resources
'node_modules/jquery/dist/jquery.js',
@ -28,13 +28,10 @@ module.exports = function(config) {
'static/lib/**/*.js',
// Application resources
'static/js/quay.module.ts',
// 'static/js/**/*.js',
'static/js/**/*.ts',
// Tests
'static/test/**/*.js',
'static/js/**/*.spec.js',
'static/js/**/*.spec.ts',
],
exclude: [
'static/js/build/bundle.js',
@ -42,8 +39,7 @@ module.exports = function(config) {
preprocessors: {
'static/lib/ngReact/react.ngReact.min.js': ['webpack'],
'static/lib/angular-moment.min.js': ['webpack'],
'static/js/quay.module.ts': ['webpack'],
'static/js/**/*.spec.ts': ['webpack'],
'static/js/**/*.ts': ['karma-typescript'],
},
webpack: {
resolve: webpackConfig.resolve,
@ -66,7 +62,7 @@ module.exports = function(config) {
webpackMiddleware: {
stats: 'errors-only'
},
reporters: ['dots', 'coverage'],
reporters: ['dots', 'coverage', 'karma-typescript'],
coverageReporter: {
dir: 'coverage',
type: 'html'

View file

@ -4,7 +4,7 @@
"private": true,
"version": "1.0.0",
"scripts": {
"test": "./node_modules/.bin/karma start --single-run --browsers Chrome",
"test": "./node_modules/.bin/karma start --single-run --browsers PhantomJS",
"build": "./node_modules/.bin/webpack --progress -p -v",
"watch": "./node_modules/.bin/webpack --watch"
},
@ -47,6 +47,7 @@
"karma-es6-shim": "^1.0.0",
"karma-jasmine": "^0.3.8",
"karma-phantomjs-launcher": "^1.0.0",
"karma-typescript": "^2.1.6",
"karma-webpack": "^1.8.1",
"node-sass": "3.10.1",
"phantomjs-prebuilt": "^2.1.7",

View file

@ -1,5 +1,5 @@
import * as angular from 'angular';
import { quayConfig } from './quay.config.ts';
import { quayConfig } from './quay.config';
import quayPages from './quay-pages.module';
import quayRun from './quay.run';
import { angularViewArrayFactory } from './services/angular-view-array/angular-view-array';

View file

@ -6,7 +6,7 @@ describe("Service: RouteBuilder", function() {
var currentProfile;
it("sanity", function() {
expect(true).toBe(false);
expect(true).toBe(true);
});
// beforeEach(module('quay'));

View file

@ -3,7 +3,6 @@
"baseUrl": ".",
"jsx": "react",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "./build/",
"target": "es5",
"sourceMap": true,
@ -15,6 +14,7 @@
"node_modules"
],
"include": [
"./static/js/**/*.tsx"
"./static/js/**/*.tsx",
"./static/js/**/*.ts"
]
}