Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING CHANGE: Don't export frisby.Joi #577

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ afterAll(function () {

### Expecting JSON types using Joi

With Frisby, you can use [Joi](https://github.com/hapijs/joi) to set the expectation that the JSON body response from the HTTP call meets a defined schema. Check out the [Joi API](https://github.com/hapijs/joi/blob/master/API.md) for more details.
With Frisby, you can use [Joi](https://github.com/sideway/joi) to set the expectation that the JSON body response from the HTTP call meets a defined schema. Check out the [joi.dev](https://joi.dev/api/) for more details.

## Using Jasmine Matchers Directly

Expand Down
2 changes: 1 addition & 1 deletion __tests__/expects_jsonTypes_spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const Joi = require('joi');
const frisby = require('../src/frisby');
const Joi = frisby.Joi;
const mocks = require('./fixtures/http_mocks');

const testHost = 'http://api.example.com';
Expand Down
3 changes: 1 addition & 2 deletions __tests__/expects_json_path_spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const Joi = require('joi');
const frisby = require('../src/frisby');
const Joi = frisby.Joi;
const mocks = require('./fixtures/http_mocks');

const testHost = 'http://api.example.com';
Expand Down Expand Up @@ -168,4 +168,3 @@ describe('expect(\'json\', <path>, <value>)', function() {
});

});

2 changes: 0 additions & 2 deletions src/frisby.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const _ = require('lodash');
const Joi = require('joi');
const pkg = require('../package.json');
const FormData = require('form-data');
const FrisbySpec = require('./frisby/spec.js');
Expand Down Expand Up @@ -150,7 +149,6 @@ module.exports = {
get: get,
globalSetup,
head,
Joi, // REVIEW: export?
options,
patch,
post,
Expand Down