Skip to content

Commit

Permalink
test: add sensebox:home test
Browse files Browse the repository at this point in the history
  • Loading branch information
felixerdy committed Nov 13, 2024
1 parent 1dd17ce commit d008ab2
Show file tree
Hide file tree
Showing 3 changed files with 901 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"scripts": {
"start": "node src/index.js",
"test": "mocha --exit --timeout 30000"
"test": "mocha --exit --timeout 60000"
},
"dependencies": {
"body-parser": "^1.18.2",
Expand Down
15 changes: 15 additions & 0 deletions test/mcu.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ describe("Compiler - MCU", () => {
});
});

it("should compile a senseBox:home sketch (from openSenseMap) for senseBox MCU", (done) => {
const sketch = fs.readFileSync("test/sketches/mcu/full-home.ino", "utf8");

chai
.request(server)
.post("/compile")
.send({ board: "sensebox-mcu", sketch })
.end((err, res) => {
res.should.have.status(200);
res.body.data.should.have.property("id");
downloadId_mcu = res.body.data.id;
done();
});
});

it("should download sketch for senseBox MCU", (done) => {
chai
.request(server)
Expand Down
Loading

0 comments on commit d008ab2

Please sign in to comment.