Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added other steps

...

We then created a pico, named "math", installed in it the round_test ruleset, and visited the Testing tab of the UI:

Using this testing jig, we were satisfied that we were getting good results, documented here:

...

Code Block
  t.is(
    await kmath.round({}, [0.46]), 0
  )
  t.is(
    await kmath.round({}, [-0.46]), -0
  )
  t.is(
    await kmath.round({}, [-0.46, 1]), -0.5
  )
  t.is(
    await kmath.round({}, [4066, 0]), 4066
  )
  t.is(
    await kmath.round({}, [4066, -1]), 4070
  )
  t.is(
    await kmath.round({}, [4066, -2]), 4100
  )
  t.is(
    await kmath.round({}, [4066, -3]), 4000
  )
  t.is(
    await kmath.round({}, [4066, -4]), 0
  )
  await terr('round', {}, [], 'Error: math:round needs a number')

To run the tests, from within the pico-engine-core folder, useĀ 

Code Block
$ npm run test

Requesting a review

On the GitHub web site, viewing our pull request, we select a reviewer (near the upper-right corner) and click on that person's name to request a review. Assuming everything is satisfactory, they will accept our change and merge it into the master branch.

While awaiting the review, you can return to the master branch using this command:

Code Block
git checkout master

See the git cheatsheet for more information.

Cleaning up

Once your pull request has been reviewed and merged into the master branch, you need to do a little clean-up.

...