Merge pull request #28 from inf3cti0n95/tests

test: Added Support for Jest for Testing
master
Viraj Trivedi 7 years ago committed by GitHub
commit d511a7fdba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,7 @@
import { Server, WebSocket } from 'mock-socket';
import { RealTimeAPI } from "../src/RealTimeAPI";
describe("RxSQL Tests", () => {
it("Mock Test", ()=> {
})
})

@ -13,11 +13,15 @@
}, },
"devDependencies": { "devDependencies": {
"@types/crypto-js": "^3.1.33", "@types/crypto-js": "^3.1.33",
"@types/jest": "^23.1.1",
"@types/uuid": "^3.0.0", "@types/uuid": "^3.0.0",
"jest": "^23.1.0",
"mock-socket": "^7.1.0",
"ts-jest": "^22.4.6",
"typescript": "^2.3.4" "typescript": "^2.3.4"
}, },
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "jest --env=jsdom"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -35,5 +39,23 @@
"bugs": { "bugs": {
"url": "https://github.com/inf3cti0n95/Rocket.Chat.RealTime.API.RxJS/issues" "url": "https://github.com/inf3cti0n95/Rocket.Chat.RealTime.API.RxJS/issues"
}, },
"homepage": "https://github.com/inf3cti0n95/Rocket.Chat.RealTime.API.RxJS#readme" "homepage": "https://github.com/inf3cti0n95/Rocket.Chat.RealTime.API.RxJS#readme",
"jest": {
"moduleFileExtensions": [
"ts",
"tsx",
"js"
],
"transform": {
"^.+\\.(ts|tsx)$": "ts-jest"
},
"globals": {
"ts-jest": {
"tsConfigFile": "tsconfig.json"
}
},
"testMatch": [
"**/__tests__/*.+(ts|tsx|js)"
]
}
} }

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save