Skip to content

Commit 85fdd2f

Browse files
committed
test(validate-location-type): respect --force flag
1 parent 8a9b2e5 commit 85fdd2f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

node-tests/unit/tasks/validate/location-type-test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ var td = require('testdouble');
44
var expect = require('../../../helpers/expect');
55
var mockProject = require('../../../fixtures/ember-cordova-mock/project');
66
var ValidateLocType = require('../../../../lib/tasks/validate/location-type');
7+
var logger = require('../../../../lib/utils/logger');
8+
var contains = td.matchers.contains;
79

810
describe('Validate Location Type', function() {
911
var validateLoc;
@@ -32,4 +34,15 @@ describe('Validate Location Type', function() {
3234
validateLoc.config = { locationType: 'hash' };
3335
return expect(validateLoc.run()).to.be.fulfilled;
3436
});
37+
38+
it('when force is true, it warns vs rejects', function() {
39+
validateLoc.config = { locationType: 'auto' };
40+
validateLoc.force = true;
41+
42+
var warnDouble = td.replace(logger, 'warn');
43+
44+
return validateLoc.run().then(function() {
45+
td.verify(warnDouble(contains('You have passed the --force flag')));
46+
})
47+
});
3548
});

0 commit comments

Comments
 (0)