Skip to content

Add tests for BoardsServiceProvider #1337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix tests
  • Loading branch information
Alberto Iannaccone committed Aug 19, 2022
commit cb2ef9c6ef536a4b9f1931d1bf41d7e6969e4aed
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ describe.only('BoardsServiceProvider', () => {
.setup((b) => b.getAttachedBoards())
.returns(async () => [aBoard]);
});
context('and there is one unrecognized devicec available on a port', () => {
context('and there is one unrecognized device available on a port', () => {
beforeEach(async () => {
boardsService
.setup((b) => b.getAvailablePorts())
Expand Down Expand Up @@ -244,8 +244,8 @@ describe.only('BoardsServiceProvider', () => {
() => {
beforeEach(async () => {
subject.boardsConfig = {
selectedBoard: { ...aBoard, port: anotherPort },
selectedPort: anotherPort,
selectedBoard: aBoard,
selectedPort: aPort,
};
await tick();
});
Expand All @@ -268,7 +268,7 @@ describe.only('BoardsServiceProvider', () => {
});

it('board should remain selected with NO port selected', async () => {
expect(subject.boardsConfig).to.equal({
expect(subject.boardsConfig).to.deep.equal({
selectedBoard: aBoard,
selectedPort: undefined,
});
Expand All @@ -286,13 +286,13 @@ describe.only('BoardsServiceProvider', () => {
boards: [],
ports: [anotherPort],
},
uploadInProgress: true,
uploadInProgress: false,
});
await tick();
});

it('board should remain selected with NO port selected', async () => {
expect(subject.boardsConfig).to.equal({
expect(subject.boardsConfig).to.deep.equal({
selectedBoard: aBoard,
selectedPort: aPort,
});
Expand Down