Skip to content

Commit

Permalink
Dont modify the global testServer object
Browse files Browse the repository at this point in the history
  • Loading branch information
niekcandaele committed Jul 4, 2020
1 parent 44839eb commit 081ec3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/unit/helpers/sdtd/validate-item-name.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ describe('HELPER sdtd/validate-item-name', () => {
});

it('Errors when an unexisting server is given', async () => {
const fakeServer = sails.testServer;
const fakeServer = {}
Object.assign(fakeServer, sails.testServer)

fakeServer.id += 5
await expect(sails.helpers.sdtd.validateItemName(fakeServer, "ammo9mmBulletBall")).to.eventually.be.rejectedWith(Error)
});
Expand Down

0 comments on commit 081ec3b

Please sign in to comment.