Snippets Collections
test('the data is peanut butter', () => {
  expect.assertions(1);
  return fetchData().then(data => {
    expect(data).toBe('peanut butter');
  });
});
test('the data is peanut butter', done => {
  function callback(data) {
    expect(data).toBe('peanut butter');
    done();
  }

  fetchData(callback);
});
bookmark
dashboard

Fri Sep 04 2020 05:57:34 GMT+0000 (UTC) https://deltice.github.io/jest/docs/pt-BR/asynchronous.html#content

#javascript #jest
bookmark
dashboard

Fri Sep 04 2020 05:41:53 GMT+0000 (UTC) https://deltice.github.io/jest/docs/pt-BR/asynchronous.html#content

#javascript #jest

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension