Skip to content

Commit 99e7030

Browse files
committed
add test for address
1 parent beb34b8 commit 99e7030

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"scripts": {
5454
"clean": "git clean -fdx",
5555
"build": "tsc -p ./src && cpx src/common/*.sh out/common",
56+
"build:watch": "tsc -w -p ./src && cpx src/common/*.sh out/common",
5657
"package": "vsce package",
5758
"full-build": "npm run clean && npm install && npm run build && npm run package",
5859
"launch-as-server": "node --nolazy ./out/debug-adapter/nativeScriptDebug.js --server=4712",

src/tests/nativeScriptDebugAdapter.tests.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,16 @@ describe('NativeScriptDebugAdapter', () => {
127127
}));
128128
});
129129

130+
it(`${method} for ${platform} should set debug address`, async () => {
131+
const spy = sinon.spy(ChromeDebugAdapter.prototype, 'attach');
132+
133+
await nativeScriptDebugAdapter[method](argsMock);
134+
135+
sinon.assert.calledWith(spy, sinon.match({
136+
address: platform === "ios" ? "localhost" : undefined,
137+
}));
138+
});
139+
130140
it(`${method} for ${platform} should translate args to chrome debug args`, async () => {
131141
const spy = sinon.spy(ChromeDebugAdapter.prototype, 'attach');
132142

0 commit comments

Comments
 (0)