-
-
Notifications
You must be signed in to change notification settings - Fork 197
/
Copy pathplatform-service.ts
29 lines (23 loc) · 1.09 KB
/
platform-service.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/// <reference path=".d.ts" />
import PlatformServiceLib = require('../lib/services/platform-service');
import NodePackageManagerLib = require('../lib/node-package-manager');
import ProjectLib = require('../lib/services/project-service');
import stubs = require('./stubs');
import yok = require('../lib/common/yok');
require('should');
var testInjector = new yok.Yok();
testInjector.register('platformService', PlatformServiceLib.PlatformService);
testInjector.register('errors', stubs.ErrorsStub);
testInjector.register('fs', stubs.FileSystemStub);
testInjector.register('logger', stubs.LoggerStub);
testInjector.register('npm', stubs.NPMStub);
testInjector.register('projectData', stubs.ProjectDataStub);
testInjector.register('platformsData', stubs.PlatformsDataStub);
describe('PlatformService', function(){
describe('#updatePlatforms()', function(){
it('should fail when no services provided', function(){
var platformService = testInjector.resolve('platformService');
(function(){return platformService.updatePlatforms().wait(); }).should.throw();
})
})
});