Skip to content
Snippets Groups Projects
Commit ee92d0b1 authored by Xiao Gui's avatar Xiao Gui
Browse files

WIP

parent 8791223a
No related branches found
No related tags found
No related merge requests found
// Karma configuration
// Generated on Mon Aug 06 2018 12:37:42 GMT+0200 (CEST)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '..',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
// 'src/**/*[Ss]pec.js'
'test.js'
],
// list of files / patterns to exclude
exclude: [
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'test.js' : ['webpack']
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
})
}
{
"spec_dir": "spec",
"spec_files": [
"**/*[sS]pec.js"
],
"helpers": [
"helpers/**/*.js"
],
"stopSpecOnExpectationFailure": false,
"random": true
}
/* required or reflect metadata error will be thrown */
import 'reflect-metadata';
const testContext = require.context('../src',true,/\.spec.ts$/)
testContext.keys().map(testContext)
\ No newline at end of file
// import { CopyPropertyPipe } from './copyProperty.pipe'
// import {describe,it,expect} from 'jasmine'
import { TempClass } from './temp'
describe('copyProperty.pipe works as expected', () => {
it('jasmine works', () => {
expect(1).toBe(1)
})
// it('pipe should work', () => {
// const pipe = new CopyPropertyPipe()
// const array = [{
// name : 'name1',
// key1 : 'value1'
// },{
// name : 'name2',
// key1 : 'value2'
// }]
// const newItem = pipe.transform(array,'key1','key2')
// // expect(newItem).toContain({
// // namem : 'name1',
// // key1 : 'value1',
// // key2 : 'value1'
// // })
// expect(newItem[0]).toEqual({
// name : 'name1',
// key1 : 'value1',
// key2 : 'value1'
// })
// })
})
\ No newline at end of file
export class TempClass{
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment