2.8.1 • Published 19 days ago

@cob/rest-api-wrapper v2.8.1

Weekly downloads
-
License
SEE LICENSE IN <f...
Repository
-
Last release
19 days ago

Initial Setup

git clone @cob/rest-api-wrapper
cd rest-api-wrapper
npm i

Testing

You can check the status of the existing tests by running:

npm run test

However these test are supposed to be running continuously throughout the development process. For this first make sure you have jest cli installed:

npm install jest --global

then run jest in watch mode and check for error during the normal development process. The -o flag means 'only test changed files'.

To support es6 modules we need to use these flags:

node --no-warnings --trace-warnings --experimental-vm-modules node_modules/.bin/jest  --watch -o

Test cenario baseline

For the tests to run as planned there should be the following instances

Troubleshooting tests

Some of the reasons tests can fail, without just cause, are the following:

  • incorrect base info (check above what is expected)
  • more than 1 jest process running. Check ps -ef | grep jest to make sure there is no unknow jest running in the background
  • no connectivity to https://learning.cultofbits.com

Usefull strategies to analise a specific failling test :

  • run jest --watch -o inside a javascipt debug console (in VCode for example). Breakpoints and debugging will work.
  • change the test to test.only(...) to make sure it is not a conflict with other tests in the same test file
  • try jest --watch -o --runInBand if you think there may be conflicting behavior between test files
  • when tests are not running every db*.json files should be stable (ie, not changing). If they are changing it means some jest is running or a test didn't stop adequately. In this case stop all jest processes and restart jest.

Notice that:

  • There should be only one jest process running
    • if more than two developers are running the DB instances might be overlapped
    • if more than two process running all db*.json cache info will be unreliable
2.8.1

19 days ago

2.8.0

19 days ago

2.7.0

27 days ago

2.5.0

10 months ago

2.6.1

10 months ago

2.6.0

10 months ago

2.4.1

1 year ago

2.4.0

1 year ago

2.3.2

1 year ago

2.3.1

1 year ago

2.3.0

2 years ago

2.2.0

2 years ago

2.1.7

2 years ago

2.1.6

3 years ago

2.1.5

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago