Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Make tests work in api-explorer
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Harrington committed Aug 2, 2018
1 parent 429b146 commit 41f40da
Show file tree
Hide file tree
Showing 24 changed files with 2,261 additions and 6,392 deletions.
11 changes: 0 additions & 11 deletions packages/api-explorer/.babelrc

This file was deleted.

5 changes: 4 additions & 1 deletion packages/api-explorer/__tests__/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"env": {
"jest": true
}
},
"rules": {
"import/no-extraneous-dependencies": 0,
},
}
2 changes: 1 addition & 1 deletion packages/api-explorer/__tests__/Doc.test.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const extensions = require('@readme/oas-extensions/');
const extensions = require('@readme/oas-extensions');
const { Request, Response } = require('node-fetch');

global.Request = Request;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const React = require('react');
const { shallow } = require('enzyme');
const DescriptionField = require('../../src/form-components/DescriptionField');
const markdown = require('../../src/lib/markdown');
const markdown = require('@readme/markdown');

test('should parse description as markdown', () => {
const actual = '`all` or a comma-separated list of action [fields](ref:action-object)';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ test('should pass through values to code snippet', () => {
});

test('should not contain proxy url', () => {
const snippet = shallow(generateCodeSnippet(
Object.assign({}, oas, { [extensions.PROXY_ENABLED]: true }),
operation,
values,
'node',
));
const snippet = shallow(
generateCodeSnippet(
Object.assign({}, oas, { [extensions.PROXY_ENABLED]: true }),
operation,
values,
'node',
),
);

expect(snippet.text()).toEqual(expect.stringMatching('http://example.com/path/123'));
});
Expand Down
17 changes: 0 additions & 17 deletions packages/api-explorer/arrow-function-coverage-fix.js

This file was deleted.

6 changes: 6 additions & 0 deletions packages/api-explorer/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const config = require('../../jest.config');

module.exports = {
...config,
rootDir: './',
};
Loading

0 comments on commit 41f40da

Please sign in to comment.