Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: multiple bugfixes, details in description
- Fixed that prevos would not get their evolution method parsed correctly - Fixed that prevos and evos were not parsed to Titlecase - Covered more special cases in unit tests - Regional forms with non-regional pre-evo - Regional forms with regional pre-evos - Gigantamax forms - Mega forms - Covered error case in individual file - build: Changed test runner to jest-circus for automatic retries - test: moved server setup to global Jest setup file
- Loading branch information
Showing
11 changed files
with
248 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { oneLine } from 'common-tags'; | ||
import fetch from 'supertest'; | ||
import { SERVER } from './utils'; | ||
|
||
describe('ItemIntent', () => { | ||
test('GIVEN invalid data THEN returns error response', async () => { | ||
// Mocking out the GraphQL warning response | ||
jest.spyOn(console, 'warn').mockImplementationOnce(() => undefined); | ||
expect.assertions(2); | ||
|
||
const res = await fetch(SERVER) | ||
.post('/dexa') | ||
.send({ | ||
request: { | ||
type: 'IntentRequest', | ||
intent: { | ||
name: 'DexIntent', | ||
slots: { | ||
POKEMON: { | ||
name: 'POKEMON', | ||
value: 'aklsjdkjlashgdjlhaksgdjaghsdghasjd' | ||
} | ||
} | ||
} | ||
} | ||
}); | ||
|
||
const { ssml } = res.body.response.outputSpeech; | ||
|
||
expect(res.status).toBe(200); | ||
expect(ssml).toBe(oneLine` | ||
<speak>I am sorry but I could not resolve that query. | ||
I think you said aklsjdkjlashgdjlhaksgdjaghsdghasjd? | ||
Maybe try again, or respond with \"Alexa Cancel\" if you want to stop.</speak> | ||
`); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { setup, teardown } from './utils'; | ||
|
||
jest.retryTimes(2); | ||
|
||
beforeAll(() => { | ||
setup(); | ||
}); | ||
|
||
afterAll(() => { | ||
teardown(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.