-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: started working on integration tests, added a client-side stub
- Loading branch information
Showing
3 changed files
with
105 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"include": [ | ||
], | ||
"exclude": { | ||
"general": [], | ||
"server": [ | ||
"**/node_modules/**/*.json", | ||
"**/.!(meteor)*/**", | ||
"**/packages/!(local-test_?*.js)", | ||
"**/+([^:]):+([^:])/**", | ||
"**/@(test|tests|spec|specs)/**", | ||
"**/?(*.)test?(s).?*", | ||
"**/?(*.)spec?(s).?*", | ||
"**/?(*.)app-test?(s).?*", | ||
"**/?(*.)app-spec?(s).?*" | ||
], | ||
"client": [ | ||
"**/*.json", | ||
"**/client/stylesheets/**", | ||
"**/.npm/package/node_modules/**", | ||
"**/web.browser/packages/**", | ||
"**/.?*/**", | ||
"**/packages/!(local-test_?*.js)", | ||
"**/+([^:]):+([^:])/**", | ||
"**/@(test|tests|spec|specs)/**", | ||
"**/?(*.)test?(s).?*", | ||
"**/?(*.)spec?(s).?*", | ||
"**/?(*.)app-test?(s).?*", | ||
"**/?(*.)app-spec?(s).?*" | ||
] | ||
}, | ||
"remapFormat": ["html", "cobertura", "clover", "json", "json-summary", "lcovonly", "teamcity", "text", "text-summary"], | ||
"output": "./.coverage" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* Integration test for peripheralDevice */ | ||
|
||
|
||
import * as chai from 'chai'; | ||
import { Random } from 'meteor/random'; | ||
import {} from 'mocha'; | ||
|
||
import { PeripheralDevices } from '../../lib/collections/PeripheralDevices'; | ||
//import { ServerPeripheralDeviceAPI } from '../peripheralDevice'; | ||
import { PeripheralDeviceAPI } from '../../lib/api/peripheralDevice'; | ||
|
||
import {getCurrentTime} from '../../lib/lib'; | ||
|
||
const expect = chai.expect; | ||
|
||
|
||
|
||
|
||
|
||
describe('Access to peripheralDevice API', function () { | ||
beforeEach(function() { | ||
//console.log('Logout'); | ||
}); | ||
afterEach(function() { | ||
//console.log('Logout'); | ||
}); | ||
/* | ||
it('peripheralDevice.setStatus()', async function () { | ||
var deviceId = Random.id(); | ||
var token = Random.id(); | ||
var returnedId = await PeripheralDeviceAPI.init(deviceId, token); | ||
var returnedStatus = await PeripheralDeviceAPI.setStatus(deviceId, { | ||
statusCode: PeripheralDeviceAPI.StatusCode.GOOD, | ||
messages: ["It's all good"] | ||
}); | ||
// check that there is an object | ||
var md = PeripheralDevices.findOne(deviceId); | ||
expect(md).to.be.an('object'); | ||
expect(md.status).to.be.an('object'); | ||
expect(md.status.statusCode).to.be.equal(PeripheralDeviceAPI.StatusCode.GOOD); | ||
expect(md.status.messages).to.have.length(1); | ||
// clear up after ourselves: | ||
}); | ||
*/ | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters