Skip to content

Instantly share code, notes, and snippets.

@desaijay315
Created May 2, 2022 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save desaijay315/34080cd4bd4a4b932d4c174161319d76 to your computer and use it in GitHub Desktop.
Save desaijay315/34080cd4bd4a4b932d4c174161319d76 to your computer and use it in GitHub Desktop.
import { sum } from '../../src/foo'
describe('TypeScript spec', () => {
it('works', () => {
cy.wrap('foo').should('equal', 'foo')
})
it('calls TS source file', () => {
expect(sum(1, 2, 3, 4)).to.equal(10)
})
})
export const sum
= (...a: number[]) =>
a.reduce((acc, val) => acc + val, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment