Skip to content

Commit

Permalink
chore: ignore husky config
Browse files Browse the repository at this point in the history
  • Loading branch information
lykmapipo committed Mar 21, 2021
1 parent 9aaca3f commit 2a57f3c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pids
# Temporary
.tmp
.grunt
.husky

# Dependencies
node_modules
Expand Down
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

35 changes: 35 additions & 0 deletions test/index.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { expect, faker, nock } from '@lykmapipo/test-helpers';

describe('majifix-int-dawasco', () => {
beforeEach(() => {
delete process.env.BILL_API_BASE_URL;
nock.cleanAll();
});

it('should send http post request', (done) => {
process.env.BILL_API_BASE_URL = 'https://127.0.0.1/v1/';

const data = { age: 11 };

nock(process.env.BILL_API_BASE_URL)
.post('/users')
.query(true)
.reply(201, data);

post('/users', data)
.then((user) => {
expect(user).to.exist;
expect(user).to.exist;
expect(user).to.be.eql(data);
done(null, user);
})
.catch((error) => {
done(error);
});
});

afterEach(() => {
delete process.env.BILL_API_BASE_URL;
nock.cleanAll();
});
});

0 comments on commit 2a57f3c

Please sign in to comment.