forked from fealebenpae/node-xcode
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpbxTargetByName.js
More file actions
29 lines (24 loc) · 795 Bytes
/
pbxTargetByName.js
File metadata and controls
29 lines (24 loc) · 795 Bytes
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
var fullProject = require('./fixtures/full-project')
fullProjectStr = JSON.stringify(fullProject),
pbx = require('../lib/pbxProject'),
proj = new pbx('.');
function cleanHash() {
return JSON.parse(fullProjectStr);
}
exports.setUp = function (callback) {
proj.hash = cleanHash();
callback();
}
exports.pbxTargetByName = {
'should return PBXNativeTarget': function (test) {
var pbxTarget = proj.pbxTargetByName('KitchenSinktablet');
test.ok(pbxTarget);
test.equals(pbxTarget.isa, 'PBXNativeTarget');
test.done()
},
'should return null when PBXNativeTarget not found': function (test) {
var pbxTarget = proj.pbxTargetByName('Invalid');
test.equal(pbxTarget, null);
test.done()
}
}