Skip to content

Commit

Permalink
0.2.1 - working Wrapper with testcases #1
Browse files Browse the repository at this point in the history
  • Loading branch information
IJustDev committed Nov 13, 2019
1 parent e67d39f commit f61e24d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.2.1] - 2019-11-13
### Changed
- Added paremeter wsWrapper to wrapper in `games.spec.js`

## [0.2.0] - 2019-11-12
### Added
- Chai and Mocha for testing
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "cardjizzerwrapper",
"version": "0.2.0",
"version": "0.2.1",
"description": "Wrapper for the CardJizzerBackend",
"main": "index.js",
"scripts": {
"test": "mocha src/**/*.spec.js",
"test": "mocha src/**/*.spec.js --exit",
"lint": "eslint src/**/*.js"
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions src/games.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ const { expect } = require('chai');
const { Wrapper, WebsocketWrapper } = require('./index');

describe('Game Tests', () => {
it('Invoke fetchGames', () => {
it('Invoke fetchGames', (done) => {
const ws = new WebsocketWrapper({ url: 'ws://localhost:8100/' });
ws.initialize().then(() => {
const wrapper = new Wrapper();
const wrapper = new Wrapper(ws);
wrapper.Games.fetchGames().then((games) => {
// eslint-disable-next-line
expect(games, 'GamesObject is undefined.').to.not.be.undefined;
done();
});
});
});
Expand Down

0 comments on commit f61e24d

Please sign in to comment.