Skip to content

Commit 09400ea

Browse files
committed
remove unnecessary faff with messages import
1 parent 0215f57 commit 09400ea

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/formatter/helpers/gherkin_document_parser_spec.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, it } from 'mocha'
22
import { expect } from 'chai'
33
import { reindent } from 'reindent-template-literals'
4-
import * as messages from '@cucumber/messages'
4+
import { GherkinDocument } from '@cucumber/messages'
55
import {
66
IParsedSourceWithEnvelopes,
77
parse,
@@ -13,8 +13,6 @@ import {
1313
getGherkinStepMap,
1414
} from './gherkin_document_parser'
1515

16-
import IGherkinDocument = messages.GherkinDocument
17-
1816
describe('GherkinDocumentParser', () => {
1917
describe('getGherkinStepMap', () => {
2018
it('works for a Background and Scenario', async () => {
@@ -308,15 +306,15 @@ describe('GherkinDocumentParser', () => {
308306
})
309307
})
310308

311-
async function parseGherkinDocument(data: string): Promise<IGherkinDocument> {
309+
async function parseGherkinDocument(data: string): Promise<GherkinDocument> {
312310
const parsed: IParsedSourceWithEnvelopes = await parse({
313311
data,
314312
uri: 'features/a.feature',
315313
})
316314
return parsed.gherkinDocument
317315
}
318316

319-
async function withBackgroundAndScenario(): Promise<IGherkinDocument> {
317+
async function withBackgroundAndScenario(): Promise<GherkinDocument> {
320318
return await parseGherkinDocument(
321319
reindent(`
322320
Feature: a feature
@@ -329,7 +327,7 @@ async function withBackgroundAndScenario(): Promise<IGherkinDocument> {
329327
)
330328
}
331329

332-
async function withBackgroundAndScenarioOutline(): Promise<IGherkinDocument> {
330+
async function withBackgroundAndScenarioOutline(): Promise<GherkinDocument> {
333331
return await parseGherkinDocument(
334332
reindent(`
335333
Feature: a feature
@@ -346,7 +344,7 @@ async function withBackgroundAndScenarioOutline(): Promise<IGherkinDocument> {
346344
)
347345
}
348346

349-
async function withBackgroundAndRuleWithExamples(): Promise<IGherkinDocument> {
347+
async function withBackgroundAndRuleWithExamples(): Promise<GherkinDocument> {
350348
return await parseGherkinDocument(
351349
reindent(`
352350
Feature: a feature
@@ -365,7 +363,7 @@ async function withBackgroundAndRuleWithExamples(): Promise<IGherkinDocument> {
365363
)
366364
}
367365

368-
async function withBackgroundAndRuleWithBackgroundAndExamples(): Promise<IGherkinDocument> {
366+
async function withBackgroundAndRuleWithBackgroundAndExamples(): Promise<GherkinDocument> {
369367
return await parseGherkinDocument(
370368
reindent(`
371369
Feature: a feature

0 commit comments

Comments
 (0)