Skip to content

Commit d259b32

Browse files
committed
chore(): update tests
1 parent f469d47 commit d259b32

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

spec/cli.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var IonicAppLib = require('ionic-app-lib'),
66
Task = require('../lib/ionic/task').Task,
77
Info = IonicAppLib.info,
88
Utils = IonicAppLib.utils,
9+
Project = IonicAppLib.project,
910
rewire = require('rewire');
1011

1112
describe('Cli', function() {
@@ -17,6 +18,8 @@ describe('Cli', function() {
1718
spyOn(IonicAppLib.events, 'on');
1819
spyOn(process, 'on');
1920
spyOn(Info, 'checkRuntime');
21+
spyOn(Utils, 'cdIonicRoot');
22+
spyOn(Project, 'load');
2023

2124
spyOn(Utils, 'fail').andCallFake(function(err){
2225
console.log(err);
@@ -129,13 +132,11 @@ describe('Cli', function() {
129132
});
130133

131134
it('should change pwd for commands', function() {
132-
spyOn(Utils, 'cdIonicRoot');
133135
IonicCli.run(['node', 'bin/ionic', 'serve']);
134136
expect(Utils.cdIonicRoot).toHaveBeenCalled();
135137
});
136138

137139
it('should not change pwd for commands', function() {
138-
spyOn(Utils, 'cdIonicRoot');
139140
IonicCli.run(['node', 'bin/ionic', 'start']);
140141
expect(Utils.cdIonicRoot).not.toHaveBeenCalled();
141142
});

spec/serve.spec.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var IonicAppLib = require('ionic-app-lib'),
55
rewire = require('rewire'),
66
Utils = IonicAppLib.utils;
77

8-
var argv = {
8+
var argv = {
99
_: ['--livereload'],
1010
nogulp: false
1111
}
@@ -15,9 +15,6 @@ describe('Serve', function() {
1515

1616
beforeEach(function() {
1717
serveTask = rewire('../lib/ionic/serve');
18-
19-
spyOn(Utils, 'isIonicV2').andReturn(false);
20-
2118
});
2219

2320
it('should have serve defined', function() {

spec/stats.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ var Q = require('q'),
22
// IonicStats = require('../lib/ionic/stats').IonicStats,
33
IonicStatsModule,
44
IonicStats,
5-
IonicConfig = require('../lib/ionic/config'),
65
path = require('path'),
76
rewire = require('rewire');
87

0 commit comments

Comments
 (0)