fix: eslint being dumb

This commit is contained in:
Andrew Bastin
2021-08-17 10:25:27 +05:30
parent 7744e2eb03
commit 3534e133af
4 changed files with 43 additions and 21 deletions

View File

@@ -40,7 +40,9 @@ describe("toBe", () => {
})
test("test for strings", () => {
expect(getTestResult("pw.expect('hello').toBe('bonjour')", 0)).toEqual("FAIL")
expect(getTestResult("pw.expect('hello').toBe('bonjour')", 0)).toEqual(
"FAIL"
)
expect(getTestResult("pw.expect('hi').toBe('hi')", 0)).toEqual("PASS")
})
@@ -94,9 +96,13 @@ describe("toHaveProperty", () => {
describe("toBeLevel2xx", () => {
test("test for numbers", () => {
expect(getTestResult("pw.expect(200).toBeLevel2xx()", 0)).toEqual("PASS")
expect(getTestResult("pw.expect(200).not.toBeLevel2xx()", 0)).toEqual("FAIL")
expect(getTestResult("pw.expect(200).not.toBeLevel2xx()", 0)).toEqual(
"FAIL"
)
expect(getTestResult("pw.expect(300).toBeLevel2xx()", 0)).toEqual("FAIL")
expect(getTestResult("pw.expect(300).not.toBeLevel2xx()", 0)).toEqual("PASS")
expect(getTestResult("pw.expect(300).not.toBeLevel2xx()", 0)).toEqual(
"PASS"
)
})
test("test for strings", () => {
expect(getTestResult("pw.expect('200').toBeLevel2xx()", 0)).toEqual("PASS")
@@ -122,9 +128,13 @@ describe("toBeLevel2xx", () => {
describe("toBeLevel3xx()", () => {
test("test for numbers", () => {
expect(getTestResult("pw.expect(300).toBeLevel3xx()", 0)).toEqual("PASS")
expect(getTestResult("pw.expect(300).not.toBeLevel3xx()", 0)).toEqual("FAIL")
expect(getTestResult("pw.expect(300).not.toBeLevel3xx()", 0)).toEqual(
"FAIL"
)
expect(getTestResult("pw.expect(400).toBeLevel3xx()", 0)).toEqual("FAIL")
expect(getTestResult("pw.expect(400).not.toBeLevel3xx()", 0)).toEqual("PASS")
expect(getTestResult("pw.expect(400).not.toBeLevel3xx()", 0)).toEqual(
"PASS"
)
})
test("test for strings", () => {
expect(getTestResult("pw.expect('300').toBeLevel3xx()", 0)).toEqual("PASS")
@@ -150,9 +160,13 @@ describe("toBeLevel3xx()", () => {
describe("toBeLevel4xx()", () => {
test("test for numbers", () => {
expect(getTestResult("pw.expect(400).toBeLevel4xx()", 0)).toEqual("PASS")
expect(getTestResult("pw.expect(400).not.toBeLevel4xx()", 0)).toEqual("FAIL")
expect(getTestResult("pw.expect(400).not.toBeLevel4xx()", 0)).toEqual(
"FAIL"
)
expect(getTestResult("pw.expect(500).toBeLevel4xx()", 0)).toEqual("FAIL")
expect(getTestResult("pw.expect(500).not.toBeLevel4xx()", 0)).toEqual("PASS")
expect(getTestResult("pw.expect(500).not.toBeLevel4xx()", 0)).toEqual(
"PASS"
)
})
test("test for strings", () => {
expect(getTestResult("pw.expect('400').toBeLevel4xx()", 0)).toEqual("PASS")
@@ -178,9 +192,13 @@ describe("toBeLevel4xx()", () => {
describe("toBeLevel5xx()", () => {
test("test for numbers", () => {
expect(getTestResult("pw.expect(500).toBeLevel5xx()", 0)).toEqual("PASS")
expect(getTestResult("pw.expect(500).not.toBeLevel5xx()", 0)).toEqual("FAIL")
expect(getTestResult("pw.expect(500).not.toBeLevel5xx()", 0)).toEqual(
"FAIL"
)
expect(getTestResult("pw.expect(200).toBeLevel5xx()", 0)).toEqual("FAIL")
expect(getTestResult("pw.expect(200).not.toBeLevel5xx()", 0)).toEqual("PASS")
expect(getTestResult("pw.expect(200).not.toBeLevel5xx()", 0)).toEqual(
"PASS"
)
})
test("test for strings", () => {
expect(getTestResult("pw.expect('500').toBeLevel5xx()", 0)).toEqual("PASS")
@@ -205,8 +223,12 @@ describe("toBeLevel5xx()", () => {
describe("toHaveLength()", () => {
test("test for strings", () => {
expect(getTestResult("pw.expect('word').toHaveLength(4)", 0)).toEqual("PASS")
expect(getTestResult("pw.expect('word').toHaveLength(5)", 0)).toEqual("FAIL")
expect(getTestResult("pw.expect('word').toHaveLength(4)", 0)).toEqual(
"PASS"
)
expect(getTestResult("pw.expect('word').toHaveLength(5)", 0)).toEqual(
"FAIL"
)
expect(getTestResult("pw.expect('word').not.toHaveLength(4)", 0)).toEqual(
"FAIL"
)

View File

@@ -1,7 +1,7 @@
import { BehaviorSubject } from "rxjs"
import gql from "graphql-tag"
import cloneDeep from "lodash/cloneDeep"
import { ApolloQueryResult } from "@apollo/client/core"
import * as Apollo from "@apollo/client/core"
import { apolloClient } from "~/helpers/apollo"
interface TeamsTeamMember {
@@ -54,7 +54,7 @@ export default class TeamMemberAdapter {
let cursor: string | null = null
while (true) {
const response: ApolloQueryResult<any> = await apolloClient.query({
const response: Apollo.ApolloQueryResult<any> = await apolloClient.query({
query: gql`
query GetTeamMembers($teamID: String!, $cursor: String) {
team(teamID: $teamID) {

14
package-lock.json generated
View File

@@ -7,7 +7,7 @@
"": {
"version": "1.12.0",
"dependencies": {
"@apollo/client": "^3.4.7",
"@apollo/client": "^3.4.8",
"@nuxtjs/axios": "^5.13.6",
"@nuxtjs/composition-api": "^0.26.0",
"@nuxtjs/gtm": "^2.4.0",
@@ -101,9 +101,9 @@
}
},
"node_modules/@apollo/client": {
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.4.7.tgz",
"integrity": "sha512-EmqGxXD8hr05cIFWJFwtGXifc+Lo8hTCEuiaQMtKknHszJfqIFXSxqP+H+eJnjfuoxH74aTSsZKtJlnE83Vt6w==",
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.4.8.tgz",
"integrity": "sha512-/cNqTSwc2Dw8q6FDDjdd30+yvhP7rI0Fvl3Hbro0lTtFuhzkevfNyQaI2jAiOrjU6Jc0RbanxULaNrX7UmvjSQ==",
"dependencies": {
"@graphql-typed-document-node/core": "^3.0.0",
"@wry/context": "^0.6.0",
@@ -34738,9 +34738,9 @@
}
},
"@apollo/client": {
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.4.7.tgz",
"integrity": "sha512-EmqGxXD8hr05cIFWJFwtGXifc+Lo8hTCEuiaQMtKknHszJfqIFXSxqP+H+eJnjfuoxH74aTSsZKtJlnE83Vt6w==",
"version": "3.4.8",
"resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.4.8.tgz",
"integrity": "sha512-/cNqTSwc2Dw8q6FDDjdd30+yvhP7rI0Fvl3Hbro0lTtFuhzkevfNyQaI2jAiOrjU6Jc0RbanxULaNrX7UmvjSQ==",
"requires": {
"@graphql-typed-document-node/core": "^3.0.0",
"@wry/context": "^0.6.0",

View File

@@ -23,7 +23,7 @@
"*.{css,scss,vue}": "stylelint"
},
"dependencies": {
"@apollo/client": "^3.4.7",
"@apollo/client": "^3.4.8",
"@nuxtjs/axios": "^5.13.6",
"@nuxtjs/composition-api": "^0.26.0",
"@nuxtjs/gtm": "^2.4.0",