Skip to content

Commit

Permalink
feat(): minor
Browse files Browse the repository at this point in the history
Signed-off-by: Ana Neri <[email protected]>
  • Loading branch information
ananeridev committed Mar 2, 2023
1 parent cfc7bd3 commit af66ede
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "node --test --watch src/index.test.mjs | npx tap-spec",
"test:cov": "node --experimental-test-coverage src/index.test.mjs",
"test:only": "node --test-only src/index.test.mjs | npx tap-spec",
"test:filter": "node --test-name-pattern=\"/test [4-5]/i\" src/index.test.mjs | npx tap-spec",
"test:filter": "node --test-name-pattern=\"/test [4-5]/i\" src/index.test.mjs",
"test:report": "node --test-reporter ./src/reporter.mjs src/index.test.mjs | npx tap-spec"
},
"keywords": [],
Expand Down
16 changes: 8 additions & 8 deletions src/index.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ function power(ricky, monster) {
deepStrictEqual(current, expected);
});

// => Teste sincrono que ira falhar os poderes
// test('synchronous failing test', (t) => {
// const expected = 10
// const current = power(5, 1)
// assert.strictEqual(current, expected);
// });
// => Teste sincrono que ira falhar os poderes
test('synchronous failing test', (t) => {
const expected = 10
const current = power(5, 1)
assert.strictEqual(current, expected);
});

// => Teste assincrono usando callbacks
test('callback passa', (context, done) => {
Expand All @@ -43,7 +43,7 @@ function power(ricky, monster) {
});

// ** Mocking**
test('spies on a function', () => {
test('spie dentro de uma funcao', () => {
const power = mock.fn((ricky, monster) => {
return ricky + monster;
});
Expand Down Expand Up @@ -150,7 +150,7 @@ test('Test 4', async (t) => {
// Ja esta num exemplo
test('teste que cria atividade assincrona', (t) => {
setImmediate(() => {
t.test('subtest that is created too late', (t) => {
t.test('subtest criado mto tarde', (t) => {
throw new Error('error1');
});
});
Expand Down

0 comments on commit af66ede

Please sign in to comment.