Skip to content

EdsonLuiz/unit-testing-typescript-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unit-testing-typescript-nodejs

Practice tests in typescript

Start adding packages

npm i -D typescript ts-node @types/node jest ts-jest @types/jest

Configure Jest to use typescript

// jest.config.js
module.exports = {
  roots: ['<rootDir>/src'],
  transform: {
    '^.+\\.tsx?$': 'ts-jest'
  },
  testRegex: '(/__test__/.*|(\\.|/)(test|spec))\\.[jt]sx?$',
  moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
  verbose: true
}

About

Practice tests in typescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published