Skip to content

Commit

Permalink
refactor: use dedent string
Browse files Browse the repository at this point in the history
remove FlowFixMe
  • Loading branch information
saihaj committed Mar 31, 2021
1 parent f4421d9 commit 1820b90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/language/__tests__/printer-test.js
@@ -1,7 +1,7 @@
import { expect } from 'chai';
import { describe, it } from 'mocha';

import { dedent } from '../../__testUtils__/dedent';
import { dedent, dedentString } from '../../__testUtils__/dedent';
import { kitchenSinkQuery } from '../../__testUtils__/kitchenSinkQuery';

import { parse } from '../parser';
Expand Down Expand Up @@ -149,8 +149,7 @@ describe('Printer: Query document', () => {
const printed = print(parse(kitchenSinkQuery));

expect(printed).to.equal(
// $FlowFixMe[incompatible-call]
dedent(String.raw`
dedentString(String.raw`
query queryName($foo: ComplexType, $site: Site = MOBILE) @onQuery {
whoever123is: node(id: [123, 456]) {
id
Expand Down
5 changes: 2 additions & 3 deletions src/utilities/__tests__/printSchema-test.js
@@ -1,7 +1,7 @@
import { expect } from 'chai';
import { describe, it } from 'mocha';

import { dedent } from '../../__testUtils__/dedent';
import { dedent, dedentString } from '../../__testUtils__/dedent';

import { DirectiveLocation } from '../../language/directiveLocation';

Expand Down Expand Up @@ -157,8 +157,7 @@ describe('Type System Printer', () => {
});

expectPrintedSchema(schema).to.equal(
// $FlowFixMe[incompatible-call]
dedent(String.raw`
dedentString(String.raw`
type Query {
singleField(argOne: String = "tes\t de\fault"): String
}
Expand Down

0 comments on commit 1820b90

Please sign in to comment.