Commit 5ed39d74 authored by Stefanie Hasler's avatar Stefanie Hasler

add empty kata

parents
{
"compilerOptions": {
"outDir": "./lib",
"allowJs": true,
"target": "es2015",
"jsx": "react",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"strictNullChecks": true,
"noImplicitAny": true,
"importHelpers": true,
"noUnusedParameters": true,
"noUnusedLocals": true,
"lib": [
"es5",
"es2015",
"es2017",
"dom"
]
},
"include": [
"./src/**/*"
]
}
{
"name": "property-kata",
"version": "0.0.1",
"description": "Kata for property-based testing",
"main": "index.js",
"scripts": {
"test": "find src -name '*Spec.*' | xargs _mocha --opts src/test/mocha.opts"
},
"author": "Stefanie Hasler",
"license": "ISC",
"dependencies": {
},
"devDependencies": {
"@types/chai": "^4.0.4",
"@types/mocha": "^2.2.43",
"chai": "^4.1.2",
"chai-shallow-deep-equal": "^1.4.6",
"mocha": "^4.0.1",
"mocha-better-spec-reporter": "^3.1.0",
"mocha-testcheck": "^1.0.0-rc.0",
"ts-node": "^3.3.0",
"typescript": "^2.5.3",
"ts-mocha": "^1.0.3"
}
}
export default function numberAdder(x: number, y: number) {
return x + y
}
\ No newline at end of file
import { expect } from 'chai';
import numberAdder from './numberAdder'
describe('numberAdder', () => {
it('should add two numbers', () => {
expect(numberAdder(2,3)).to.deep.equal(5)
})
})
\ No newline at end of file
--reporter mocha-better-spec-reporter
--recursive
--require src/test/setupEnvironment.ts
--compilers ts:ts-node/register,js:ts-node/register
\ No newline at end of file
import chai = require('chai')
import chaiShallowDeepEqual = require('chai-shallow-deep-equal')
chai.should()
chai.use(chaiShallowDeepEqual);
declare module 'mocha-testcheck' {
namespace MochaTestcheck {
function check(...args: any[]): any
}
export = MochaTestcheck
}
This diff is collapsed.
Markdown is supported
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