Testing an npm library should use npm link
to 'fake' a library and allow testing.
- run in your terminal
git clone https://github.com/Topgg-Volunteer-Staff/topgg-voting-node-sdk voting-sdk
&cd voting-sdk
- run
npm link
&npm i
- create a new project anywhere on your computer.
- run
npm init -y
- open the new projects package.json and add the @top-gg/voting-sdk dependancy manually(no npm project exists yet, so
npm i @top-gg/voting-sdk
will not work)
"dependencies": {
"@top-gg/voting-sdk": "0.1.1"
},
- run
npm link @top-gg/voting-sdk
in the new projects folder