Skip to content

This is a boiler-plate for both library authors and application developers targetting TypeScript, rollup.js bundler and jest for tests.

License

Notifications You must be signed in to change notification settings

steveesamson/typescript-rollup-starter

Repository files navigation

Build Status Coverage Status

Typescript-rollup-starter

This is a boiler-plate for both library authors and application developers targetting TypeScript, rollup.js bundler and jest for tests.

Prerequisite

Usage

Clone this repo as another name like so:


$ git clone https://github.com/steveesamson/typescript-rollup-starter.git [project]

For instance, when project is todo:


$ git clone https://github.com/steveesamson/typescript-rollup-starter.git todo


$ cd todo

$ npm install

React.js

In order to test React components, using enzyme, please install the following:

  • enzyme
  • @types/enzyme
  • enzyme-adapter-react-16
  • @types/enzyme-adapter-react-16

Also, ensure to register the jest.setup.ts inside jest.config.js by adding it like so:

"setupFilesAfterEnv": ["<rootDir>/jest.setup.ts"]

Creating Tests

Write your tests inside the test folder using [module_name].spec.ts as test name template e.g LoginModule.spec.ts or LoginModule.spec.tsx Note .tsx for JSX e.g for react components.

Running Tests


$ npm run test

Check the scripts key in package.json for the complete list of targets.

About

This is a boiler-plate for both library authors and application developers targetting TypeScript, rollup.js bundler and jest for tests.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •