1074
package-lock.json
generated
1074
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -126,7 +126,7 @@
|
|||||||
"eslint-plugin-mocha": "^9.0.0",
|
"eslint-plugin-mocha": "^9.0.0",
|
||||||
"eslint-plugin-react": "^7.24.0",
|
"eslint-plugin-react": "^7.24.0",
|
||||||
"esm": "=3.2.25",
|
"esm": "=3.2.25",
|
||||||
"expect": "^1.20.2",
|
"expect": "=27.3.1",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"file-loader": "^6.0.0",
|
"file-loader": "^6.0.0",
|
||||||
"git-describe": "^4.1.0",
|
"git-describe": "^4.1.0",
|
||||||
@@ -158,6 +158,7 @@
|
|||||||
"rimraf": "^3.0.0",
|
"rimraf": "^3.0.0",
|
||||||
"sass": "^1.35.1",
|
"sass": "^1.35.1",
|
||||||
"sass-loader": "^9.0.3",
|
"sass-loader": "^9.0.3",
|
||||||
|
"sinon": "=12.0.0",
|
||||||
"source-map-support": "^0.5.19",
|
"source-map-support": "^0.5.19",
|
||||||
"tachyons-sass": "^4.9.5",
|
"tachyons-sass": "^4.9.5",
|
||||||
"terser-webpack-plugin": "^4.2.3",
|
"terser-webpack-plugin": "^4.2.3",
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
/* eslint-env mocha */
|
/* eslint-env mocha */
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { fromJSOrdered } from "core/utils"
|
import { fromJSOrdered } from "core/utils"
|
||||||
import expect, { createSpy } from "expect"
|
import sinon from "sinon"
|
||||||
|
import expect from "expect"
|
||||||
import { shallow } from "enzyme"
|
import { shallow } from "enzyme"
|
||||||
import LiveResponse from "components/live-response"
|
import LiveResponse from "components/live-response"
|
||||||
import ResponseBody from "components/response-body"
|
import ResponseBody from "components/response-body"
|
||||||
@@ -50,8 +51,8 @@ describe("<LiveResponse/>", function () {
|
|||||||
duration: 50
|
duration: 50
|
||||||
})
|
})
|
||||||
|
|
||||||
let mutatedRequestForSpy = createSpy().andReturn(mutatedRequest)
|
let mutatedRequestForSpy = sinon.stub().returns(mutatedRequest)
|
||||||
let requestForSpy = createSpy().andReturn(request)
|
let requestForSpy = sinon.stub().returns(request)
|
||||||
|
|
||||||
let components = {
|
let components = {
|
||||||
RequestSnippets: RequestSnippets,
|
RequestSnippets: RequestSnippets,
|
||||||
@@ -76,8 +77,8 @@ describe("<LiveResponse/>", function () {
|
|||||||
let wrapper = shallow(<LiveResponse {...props} />)
|
let wrapper = shallow(<LiveResponse {...props} />)
|
||||||
|
|
||||||
// Then
|
// Then
|
||||||
expect(mutatedRequestForSpy.calls.length).toEqual(test.expected.mutatedRequestForCalls)
|
expect(mutatedRequestForSpy.callCount).toEqual(test.expected.mutatedRequestForCalls)
|
||||||
expect(requestForSpy.calls.length).toEqual(test.expected.requestForCalls)
|
expect(requestForSpy.callCount).toEqual(test.expected.requestForCalls)
|
||||||
|
|
||||||
const snippets = wrapper.find("RequestSnippets")
|
const snippets = wrapper.find("RequestSnippets")
|
||||||
expect(snippets.length).toEqual(1)
|
expect(snippets.length).toEqual(1)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-env mocha */
|
/* eslint-env mocha */
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import expect, { createSpy } from "expect"
|
import expect from "expect"
|
||||||
import { mount } from "enzyme"
|
import { mount } from "enzyme"
|
||||||
import { fromJS, Map } from "immutable"
|
import { fromJS, Map } from "immutable"
|
||||||
import OnlineValidatorBadge from "components/online-validator-badge"
|
import OnlineValidatorBadge from "components/online-validator-badge"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-env mocha */
|
/* eslint-env mocha */
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import expect, { createSpy } from "expect"
|
import expect from "expect"
|
||||||
import { mount } from "enzyme"
|
import { mount } from "enzyme"
|
||||||
import { fromJS, Map } from "immutable"
|
import { fromJS, Map } from "immutable"
|
||||||
import OnlineValidatorBadge from "components/online-validator-badge"
|
import OnlineValidatorBadge from "components/online-validator-badge"
|
||||||
@@ -26,7 +26,7 @@ describe("<OnlineValidatorBadge/> Anchor Target Safety", function () {
|
|||||||
"https://validator.swagger.io/validator/debug?url=swagger.json"
|
"https://validator.swagger.io/validator/debug?url=swagger.json"
|
||||||
)
|
)
|
||||||
expect(anchor.props().target).toEqual("_blank")
|
expect(anchor.props().target).toEqual("_blank")
|
||||||
expect(anchor.props().rel || "").toInclude("noopener")
|
expect(anchor.props().rel || "").toContain("noopener")
|
||||||
expect(anchor.props().rel || "").toInclude("noreferrer")
|
expect(anchor.props().rel || "").toContain("noreferrer")
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user