1 | ## Environment
|
2 |
|
3 | Requires:
|
4 |
|
5 | - [Yarn](https://yarnpkg.com/)
|
6 | - Node 10.x
|
7 |
|
8 | ## Building
|
9 |
|
10 | The SDK uses [Webpack](https://webpack.js.org/) to compile all JavaScript assets into a set of output modules to be consumed by other module builders such as Webpack and [Rollup](https://rollupjs.org/guide/en/), or directly into and HTML file via the CDN.
|
11 |
|
12 | To perform a build, use the `build` script:
|
13 |
|
14 | ```
|
15 | yarn build
|
16 | ```
|
17 |
|
18 | ## Running Tests
|
19 |
|
20 | Unit tests can be executed using [Jest](https://jestjs.io/) by issuing the following command:
|
21 |
|
22 | ```
|
23 | yarn test:jest
|
24 | ```
|
25 |
|
26 | To interactively perform tests using Jest's `watch` mode, use:
|
27 |
|
28 | ```
|
29 | yarn test:jest:watch
|
30 | ```
|
31 |
|
32 | ## The SDK Playground
|
33 |
|
34 | To test the SDK manually and play around with the various options and features, you can invoke the Playground by using:
|
35 |
|
36 | ```
|
37 | yarn start
|
38 | ```
|
39 |
|
40 | Next, open `https://localhost:3000/support`, which will display a simple web app that allows you to interact with Auth0 to test functionality. The HTML template in `support/index.html` can be modified to test various different pieces of functionality.
|
41 |
|
42 | This is preconfigured with an Auth0 tenant and client ID but you may change this to your own for testing.
|