This module contains a collection of mocks that can be used to improve unit-tests for SuiteScript 2.0.
This module is in its early stage and is very opinionated to fit our own needs. We plan to make it more flexible to work with more codebases.
Suggestions are more than welcome 🎊
If you are looking for a way to test your suitescript codebase and this module doesn't fit your use-case, let us know anyway, we'd love to have a setup that works for everyone.
Getting started 🚀
- Install this module as a dependency:
npm i ns-suitescript-mocks --save-dev
- Import the module in your test framework init file (
const netsuiteMocks =utils: 'external-librairies-path';globaldefine = netsuiteMocksdefine;globalmockups = netsuiteMocksnsMockups;
- Write your code and use these mocks
Examples can be found in 'Examples folder in repo!'
Any contribution is more than welcome 🎉
We are using Airbnb base style, make sure you have ESLint/Standard plugin on your editor and have autofix enabled.
Feel free to modify and send us a PR, we'll review and hopefully merge it.
Before pushing your code, make sure that the tests are passing (at the moment, we only have
- Damian Królikowski - Mocks Creator - krolikowskidamian
- Łukasz Kubasiewicz - Mocks Creator - lukaszMycs
- Nicolas Ritouet - Automation setup, cleanup, documentation - nicolasritouet
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details
add examples for jest cleanup mycs occurences add tests for the repo
- automate release process
add example for other test frameworks