Skip to content

Commit

Permalink
Revert "問題の修正"
Browse files Browse the repository at this point in the history
  • Loading branch information
Azu0925 authored Apr 1, 2022
1 parent 7ef5a1c commit e9ff81b
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 806 deletions.
12 changes: 3 additions & 9 deletions .techtrain/manifests/station07.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
{
"name": "Station 07",
"id": 7,
"prepare": [
{
"command": "yarn dev --port=9000",
"background": true
}
],
"prepare": [],
"tests": [
{
"type": "cypress",
"specFile": "./cypress/integration/station07.test.tsx"
"type": "interview"
}
]
}
}
5 changes: 2 additions & 3 deletions .techtrain/manifests/station11.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"prepare": [],
"tests": [
{
"type": "jest",
"specFile": "./tests/station11.test.tsx"
"type": "interview"
}
]
}
}
3 changes: 0 additions & 3 deletions cypress.json

This file was deleted.

5 changes: 0 additions & 5 deletions cypress/fixtures/example.json

This file was deleted.

17 changes: 0 additions & 17 deletions cypress/integration/station07.spec.ts

This file was deleted.

10 changes: 0 additions & 10 deletions cypress/tsconfig.json

This file was deleted.

22 changes: 0 additions & 22 deletions cypress/utils/compareColor.ts

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"license": "MIT",
"private": false,
"dependencies": {
"cypress": "^9.5.3",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
Expand Down
17 changes: 2 additions & 15 deletions tests/mock/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ const mockResponse = (
const randomImageTest = /^(https?)?:\/\/dog.ceo\/api\/breeds\/image\/random\/?$/
const randomImageTestByBreed = /^(https?)?:\/\/dog.ceo\/api\/breed\/([A-Za-z]+)(\/([A-Za-z]+))?\/image\/random\/?$/
const breedsAllTest = /^(https?)?:\/\/dog.ceo\/api\/breeds\/list\/all\/?$/
const randomMultipleImageTestByBreed = /^(https?)?:\/\/dog.ceo\/api\/breed\/([A-Za-z]+)(\/([A-Za-z]+))?\/images\/random\/([1-9]*[0-9]){1,}\/?$/

// not used
const randomMultipleImageTest = /^(https?)?:\/\/dog.ceo\/api\/breeds\/image\/random\/([1-9]*[0-9])\/?$/
const breedImagesTest = /^(https?)?:\/\/dog.ceo\/api\/breed\/([A-Za-z]+)\/images\/?$/
const randomMultipleImageTestByBreed = /^(https?)?:\/\/dog.ceo\/api\/breed\/([A-Za-z]+)(\/([A-Za-z]+))?\/image\/random\/([1-9]*[0-9])\/?$/
const breedListTest = /^(https?)?:\/\/dog.ceo\/api\/breed\/([A-Za-z]+)\/list\/?$/

const pickOne = <T>(a: T[]): T | undefined => {
Expand Down Expand Up @@ -171,20 +171,7 @@ const mockApiRoutes: {
},
{
test: randomMultipleImageTestByBreed,
handle(url: string){
const index = url.match('\d{1,}')
if(index === null){
return {
status: 'error',
message: 'No number specified',
code: 404
}
}
return {
message: Array.from({length: Number(index)}, () => imageUrl),
status: 'sucess'
}
},
handle: unimplementedMockApiRouteHandler,
},
{
test: breedListTest,
Expand Down
2 changes: 0 additions & 2 deletions tests/station07.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// No tests for Station No.7.
// Proceed to the meeting reservation.
// TODO: ここのテストを書く
// TODO: クリアしてほしい基準を決定→たたきを大木へ送る(→問題文からみて決定する)

test.skip('No tests for Station No.7', () => {})
4 changes: 0 additions & 4 deletions tests/station11.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { act } from 'react-test-renderer'
import { fetchMock } from './mock/fetch'
import { createAsync } from './utils/createAsync'

// TODO: ここのテストがあっているかを確認して修正を行う
// TODO: クリアしてほしい基準を決定→たたきを大木へ送る
// →問題文からみて決定する。もし現状の基準が難しそうなら、問題文自体を変更して構わない

const { App } = require('../src/App') as { App: React.ComponentType<{}> }
const { DogListContainer } = require('../src/DogListContainer') as {
DogListContainer: React.ComponentType<{}>
Expand Down
Loading

0 comments on commit e9ff81b

Please sign in to comment.