forked from microsoft/vscode-arduino
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdevicecontext.test.ts
27 lines (24 loc) · 1.09 KB
/
devicecontext.test.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
import * as assert from "assert";
import * as Path from "path";
import * as util from "../src/common/util";
import { DeviceContext } from "../src/deviceContext";
suite("Arduino: Device Context config", () => {
// tslint:disable-next-line: only-arrow-functions
test("should be able to resolve arduino.json correctly", function(done) {
const deviceContext = DeviceContext.getInstance();
try {
deviceContext.loadContext().then(() => {
assert.equal(deviceContext.board, "arduino:avr:diecimila");
assert.equal(deviceContext.port, "COM4");
assert.equal(deviceContext.sketch, "blink.ino");
assert.equal(deviceContext.configuration, "cpu=atmega328");
assert.equal(deviceContext.output, null);
assert.equal(deviceContext.debugger_, null);
assert.equal(deviceContext.programmer, "arduino:jtag3isp");
done();
});
} catch (error) {
done(`Failed to load device context: ${error}`);
}
});
});