Skip to content

Commit

Permalink
fix: remove redundant tests & fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
fletcherist committed Aug 12, 2018
1 parent e5cb122 commit 3f6b5b6
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 278 deletions.
11 changes: 3 additions & 8 deletions src/api/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@ export interface IApiRequestMeta {
client_id: string;
}

enum ApiRequestBodyType {
SimpleUtterance = 'SimpleUtterance',
ButtonPressed = 'ButtonPressed',
}

export interface IApiRequesBody {
export interface IApiRequestBody {
command: string;
original_utterance: string;
type: ApiRequestBodyType;
type: 'SimpleUtterance' | 'ButtonPressed';
markup?: {
dangerous_context?: true;
};
Expand All @@ -29,7 +24,7 @@ export interface IApiRequesSession {

export interface IApiRequest {
meta: IApiRequestMeta;
request: IApiRequesBody;
request: IApiRequestBody;
session: IApiRequesSession;
version: string;
}
32 changes: 0 additions & 32 deletions tests/button.spec.ts

This file was deleted.

29 changes: 0 additions & 29 deletions tests/buttonBuilder.spec.ts

This file was deleted.

12 changes: 0 additions & 12 deletions tests/commands.spec.ts

This file was deleted.

37 changes: 0 additions & 37 deletions tests/index.spec.ts

This file was deleted.

86 changes: 0 additions & 86 deletions tests/reply.spec.ts

This file was deleted.

72 changes: 0 additions & 72 deletions tests/scene.spec.ts

This file was deleted.

4 changes: 2 additions & 2 deletions tests/testUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// import { WebhookRequest } from '../yandex/response';
export const request = (commandText, utteranceText?): WebhookRequest => ({
import { IApiRequest } from '../src/api/request';
export const request = (commandText, utteranceText?): IApiRequest => ({
meta: {
client_id: 'Developer Console',
locale: 'ru-RU',
Expand Down

0 comments on commit 3f6b5b6

Please sign in to comment.