Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
swernerx committed Jun 19, 2017
1 parent 4e42964 commit 6e9605c
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions __tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@ test("ES2015: Set", () => {
})

test("ES2015: Generator", () => {
expect(transform(`function* idMaker() { var index = 0; while(true) yield index++ }`, options).code).toMatchSnapshot()
expect(transform(`function* idMaker() { var index = 0; while(true) yield index++ }`,
options).code).toMatchSnapshot()
})

test("React: JSX", () => {
expect(transform(`function render() { return <h1>Hello</h1> }`, options).code).toMatchSnapshot()
expect(transform(`function render() { return <h1>Hello</h1> }`,
options).code).toMatchSnapshot()
})

test("ESNext: Object Spread", () => {
expect(transform(`let original = { bar : 10 }; let variant = { foo: 1, ...original }`, options).code).toMatchSnapshot()
expect(transform(`let original = { bar : 10 }; let variant = { foo: 1, ...original }`,
options).code).toMatchSnapshot()
})

test("ESNext: Class Properties", () => {
Expand All @@ -32,13 +35,16 @@ test("ESNext: Async/Await", () => {
})

test("Lodash: Lodash", () => {
expect(transform(`import { camelCase } from "lodash"; camelCase("hello world")`, options).code).toMatchSnapshot()
expect(transform(`import { camelCase } from "lodash"; camelCase("hello world")`,
options).code).toMatchSnapshot()
})

test("Lodash: Recompose", () => {
expect(transform(`import { compose } from "recompose"; compose([])`, options).code).toMatchSnapshot()
expect(transform(`import { compose } from "recompose"; compose([])`,
options).code).toMatchSnapshot()
})

test("Lodash: Async", () => {
expect(transform(`import { parallel } from "async"; parallel([])`, options).code).toMatchSnapshot()
expect(transform(`import { parallel } from "async"; parallel([])`,
options).code).toMatchSnapshot()
})

0 comments on commit 6e9605c

Please sign in to comment.