Repository: skovhus/jest-codemods
Pull request #202 (2020-09-09 21:40:39)

Transformation Test Refactoring
This PR refactored all transformation tests to have real test cases instead of implicit dynamically generate one. The benefits are
- that it is more clear what a test case is and what not, especially to first time contributors
- that IDEs can successfully find and execute individual test cases.

This has been discussed with @skovhus while fixing #200. 

jwedel: @skovhus should I open a separate issue for this?
skovhus: Thank you for fixing this!
jwedel: Sure thing! ☺️

Patch:
diff --git a/.eslintrc.js b/.eslintrc.js
index baad819..5cb91ef 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -57,5 +57,11 @@ module.exports = {
     '@typescript-eslint/no-use-before-define': 'off',
     '@typescript-eslint/no-explicit-any': 'off',
     '@typescript-eslint/explicit-module-boundary-types': 'off',
+    'jest/expect-expect': [
+      'error',
+      {
+        assertFunctionNames: ['expect', 'expectTransformation'],
+      },
+    ],
   },
 }


Test patch:
diff --git a/src/transformers/ava.test.ts b/src/transformers/ava.test.ts
index 7d5a553..5d9a314 100644
--- a/src/transformers/ava.test.ts
+++ b/src/transformers/ava.test.ts
@@ -13,53 +13,53 @@ beforeEach(() => {
   console.warn = (v) => consoleWarnings.push(v)
 })
 
-function testChanged(msg, source, expectedOutput, options = {}) {
-  test(msg, () => {
-    const result = wrappedPlugin(source, options)
-    expect(result).toBe(expectedOutput)
-    expect(consoleWarnings).toEqual([])
-  })
+function expectTransformation(source, expectedOutput, options = {}) {
+  const result = wrappedPlugin(source, options)
+  expect(result).toBe(expectedOutput)
+  expect(consoleWarnings).toEqual([])
 }
 
-testChanged(
-  'does not touch code without ava require/import',
-  `
+test('does not touch code without ava require/import', () => {
+  expectTransformation(
+    `
 // @flow
 const test = require("testlib");
 test(t => {
     t.notOk(1);
 })
 `,
-  `
+    `
 // @flow
 const test = require("testlib");
 test(t => {
     t.notOk(1);
 })
 `
-)
+  )
+})
 
-testChanged(
-  'changes code without require/import if skipImportDetection is set',
-  `
+test('changes code without require/import if skipImportDetection is set', () => {
+  expectTransformation(
+    `
 // @flow
 test(t => {
     t.notOk(1);
 })
 `,
-  `
+    `
 // @flow
 test(t => {
     expect(1).toBeFalsy();
 })
 `,
-  { skipImportDetection: true }
-)
+    { skipImportDetection: true }
+  )
+})
 
 // TODO: jscodeshift adds semi colon when preserving first line comments :/
-testChanged(
-  'maps assertions',
-  `
+test('maps assertions', () => {
+  expectTransformation(
+    `
 // @flow
 import test from 'ava'
 
@@ -93,7 +93,7 @@ test('mapping', (t) => {
   t.snapshot(abc, {}, "msg")
 })
 `,
-  `
+    `
 // @flow
 test('mapping', () => {
   const abc = { a: 'a', b: 'b', c: 'c' }
@@ -125,11 +125,12 @@ test('mapping', () => {
   expect(abc).toMatchSnapshot("msg")
 });
 `
-)
+  )
+})
 
-testChanged(
-  'handles test setup/teardown modifiers',
-  `
+test('handles test setup/teardown modifiers', () => {
+  expectTransformation(
+    `
 import test from 'ava'
 
 test.before(t => {});
@@ -137,28 +138,30 @@ test.after(t => {});
 test.beforeEach(t => {});
 test.afterEach(t => {});
 `,
-  `
+    `
 beforeAll(() => {});
 afterAll(() => {});
 beforeEach(() => {});
 afterEach(() => {});
 `
-)
+  )
+})
 
-testChanged(
-  'all tests are serial by default',
-  `
+test('all tests are serial by default', () => {
+  expectTransformation(
+    `
 import test from 'ava'
 test.serial(t => {});
 `,
-  `
+    `
 test(() => {});
 `
-)
+  )
+})
 
-testChanged(
-  'handles skip/only modifiers and chaining',
-  `
+test('handles skip/only modifiers and chaining', () => {
+  expectTransformation(
+    `
 import test from 'ava'
 
 test.only(t => {});
@@ -169,7 +172,7 @@ test.skip.serial(t => {});
 test.only.serial(t => {});
 test.serial.only(t => {});
 `,
-  `
+    `
 test.only(() => {});
 test.skip(() => {});
 
@@ -178,11 +181,12 @@ test.skip(() => {});
 test.only(() => {});
 test.only(() => {});
 `
-)
+  )
+})
 
-testChanged(
-  'removes t.pass, but keeps t.fail',
-  `
+test('removes t.pass, but keeps t.fail', () => {
+  expectTransformation(
+    `
 import test from 'ava'
 
 test('handles done.fail and done.pass', t => {
@@ -199,7 +203,7 @@ test.serial.only('handles done.fail and done.pass', t => {
     }, 500);
 });
 `,
-  `
+    `
 test('handles done.fail and done.pass', done => {
     setTimeout(() => {
         done.fail('no');
@@ -212,29 +216,31 @@ test.only('handles done.fail and done.pass', done => {
     }, 500);
 });
 `
-)
+  )
+})
 
 // TODO: semantics is not the same for t.end and done
 // t.end automatically checks for error as first argument (jasmine doesn't)
-testChanged(
-  'callback tests',
-  `
+test('callback tests', () => {
+  expectTransformation(
+    `
 import test from 'ava';
 test.cb(t => {
     fs.readFile('data.txt', t.end);
 });
 `,
-  `
+    `
 test(done => {
     fs.readFile('data.txt', done);
 });
 `
-)
+  )
+})
 
 // TODO: these hanging t variables should be removed or be renamed
-testChanged(
-  'passing around t',
-  `
+test('passing around t', () => {
+  expectTransformation(
+    `
 import test from 'ava'
 
 test('should pass', t => {
@@ -252,7 +258,7 @@ function shouldFail2(t, message) {
     })
 }
 `,
-  `
+    `
 test('should pass', () => {
     shouldFail(t, 'hi')
     return shouldFail2(t, 'hi')
@@ -268,11 +274,12 @@ function shouldFail2(t, message) {
     });
 }
 `
-)
+  )
+})
 
-testChanged(
-  'keeps async and await',
-  `
+test('keeps async and await', () => {
+  expectTransformation(
+    `
 import test from 'ava';
 
 test(async (t) => {
@@ -285,7 +292,7 @@ test(async function (t) {
     t.true(value);
 });
 `,
-  `
+    `
 test(async () => {
     const value = await promiseFn();
     expect(value).toBe(true);
@@ -296,11 +303,12 @@ test(async function () {
     expect(value).toBe(true);
 });
 `
-)
+  )
+})
 
-testChanged(
-  'destructured test argument',
-  `
+test('destructured test argument', () => {
+  expectTransformation(
+    `
 import test from 'ava';
 test(({ok}) => {
     ok('msg');
@@ -309,7 +317,7 @@ test('my test', ({is}) => {
     is('msg', 'other msg');
 });
 `,
-  `
+    `
 test(() => {
     expect('msg').toBeTruthy();
 });
@@ -317,18 +325,20 @@ test('my test', () => {
     expect('msg').toBe('other msg');
 });
 `
-)
+  )
+})
 
-testChanged(
-  'converts test.todo',
-  `
+test('converts test.todo', () => {
+  expectTransformation(
+    `
 import test from 'ava';
 test.todo('this should be a test some day');
 `,
-  `
+    `
 test.todo('this should be a test some day');
 `
-)
+  )
+})
 
 test('not supported warnings: skipping test setup/teardown hooks', () => {
   wrappedPlugin(`
@@ -417,13 +427,14 @@ test('warns about too few AVA arguments', () => {
   ])
 })
 
-testChanged(
-  'supports renaming non standard import name',
-  `
+test('supports renaming non standard import name', () => {
+  expectTransformation(
+    `
 import foo from 'ava';
 foo(() => {});
 `,
-  `
+    `
 test(() => {});
 `
-)
+  )
+})
diff --git a/src/transformers/chai-assert.test.ts b/src/transformers/chai-assert.test.ts
index b3b6611..3f5f8d9 100644
--- a/src/transformers/chai-assert.test.ts
+++ b/src/transformers/chai-assert.test.ts
@@ -13,204 +13,209 @@ beforeEach(() => {
   console.warn = (v) => consoleWarnings.push(v)
 })
 
-function testChanged(msg, source, expectedOutput, options = {}) {
-  test(msg, () => {
-    const result = wrappedPlugin(source, options)
-    expect(result).toBe(expectedOutput)
-    expect(consoleWarnings).toEqual([])
-  })
+function expectTransformation(source, expectedOutput, options = {}) {
+  const result = wrappedPlugin(source, options)
+  expect(result).toBe(expectedOutput)
+  expect(consoleWarnings).toEqual([])
 }
 
-testChanged(
-  'does not change if chai is not imported',
-  `
+test('does not change if chai is not imported', () => {
+  expectTransformation(
+    `
 // @flow
 assert.equal(foo, bar, baz);
 `,
-  `
+    `
 // @flow
 assert.equal(foo, bar, baz);
 `
-)
+  )
+})
 
-testChanged(
-  'does not change if assert is not imported from chai',
-  `
+test('does not change if assert is not imported from chai', () => {
+  expectTransformation(
+    `
 // @flow
 import { should } from 'chai';
 `,
-  `
+    `
 // @flow
 import { should } from 'chai';
 `
-)
+  )
+})
 
-testChanged(
-  'does not change if assert is not required from chai',
-  `
+test('does not change if assert is not required from chai', () => {
+  expectTransformation(
+    `
 // @flow
 const should = require('chai').should;
 `,
-  `
+    `
 // @flow
 const should = require('chai').should;
 `
-)
-
-const mappings = [
-  // follow the ordering here: http://chaijs.com/api/assert/
-  ['assert(foo === bar, baz);', 'expect(foo === bar).toBeTruthy();'],
-  ['assert(Array.isArray([]));', 'expect(Array.isArray([])).toBeTruthy();'],
-  ['assert.fail(foo, bar, baz);', 'expect(false).toBe(true);'],
-  ['assert.isOk(foo, msg);', 'expect(foo).toBeTruthy();'],
-  ['assert.isNotOk(foo);', 'expect(foo).toBeFalsy();'],
-  ['assert.equal(foo, bar, baz);', 'expect(foo).toEqual(bar);'],
-  ['assert.notEqual(foo, bar, baz);', 'expect(foo).not.toEqual(bar);'],
-  ['assert.strictEqual(foo, bar, baz);', 'expect(foo).toBe(bar);'],
-  ['assert.notStrictEqual(foo, bar, baz);', 'expect(foo).not.toBe(bar);'],
-  ['assert.deepEqual(foo, bar, baz);', 'expect(foo).toEqual(bar);'],
-  ['assert.notDeepEqual(foo, bar, baz);', 'expect(foo).not.toEqual(bar);'],
-  ['assert.isAbove(foo, bar, baz);', 'expect(foo).toBeGreaterThan(bar);'],
-  ['assert.isAtLeast(foo, bar, baz);', 'expect(foo).toBeGreaterThanOrEqual(bar);'],
-  ['assert.isBelow(foo, bar, baz);', 'expect(foo).toBeLessThan(bar);'],
-  ['assert.isAtMost(foo, bar, baz);', 'expect(foo).toBeLessThanOrEqual(bar);'],
-  ['assert.isTrue(foo);', 'expect(foo).toBe(true);'],
-  ['assert.isTrue(foo, msg);', 'expect(foo).toBe(true);'],
-  ['assert.isNotTrue(foo, msg);', 'expect(foo).not.toBe(true);'],
-  ['assert.isFalse(foo, msg);', 'expect(foo).toBe(false);'],
-  ['assert.isNotFalse(foo, msg);', 'expect(foo).not.toBe(false);'],
-  ['assert.isNull(foo, msg);', 'expect(foo).toBeNull();'],
-  ['assert.isNotNull(foo, msg);', 'expect(foo).not.toBeNull();'],
-  ['assert.isNaN(foo, msg);', 'expect(foo).toBe();'],
-  ['assert.isNotNaN(foo, msg);', 'expect(foo).not.toBe();'],
-  ['assert.isUndefined(foo, msg);', 'expect(foo).not.toBeDefined();'],
-  ['assert.isDefined(foo, msg);', 'expect(foo).toBeDefined();'],
-  ['assert.isFunction(foo, msg);', "expect(typeof foo).toBe('function');"],
-  ['assert.isNotFunction(foo, msg);', "expect(typeof foo).not.toBe('function');"],
-  ['assert.isObject(foo, msg);', "expect(typeof foo).toBe('object');"],
-  ['assert.isNotObject(foo, msg);', "expect(typeof foo).not.toBe('object');"],
-  ['assert.isArray(foo, msg);', 'expect(Array.isArray(foo)).toBe(true);'],
-  ['assert.isNotArray(foo, msg);', 'expect(Array.isArray(foo)).not.toBe(true);'],
-  ['assert.isString(foo, msg);', "expect(typeof foo).toBe('string');"],
-  ['assert.isNotString(foo, msg);', "expect(typeof foo).not.toBe('string');"],
-  ['assert.isNumber(foo, msg);', "expect(typeof foo).toBe('number');"],
-  ['assert.isNotNumber(foo, msg);', "expect(typeof foo).not.toBe('number');"],
-  ['assert.isBoolean(foo, msg);', "expect(typeof foo).toBe('boolean');"],
-  ['assert.isNotBoolean(foo, msg);', "expect(typeof foo).not.toBe('boolean');"],
-  ['assert.typeOf(foo, bar, baz);', 'expect(typeof foo).toBe(bar);'],
-  ['assert.notTypeOf(foo, bar, baz);', 'expect(typeof foo).not.toBe(bar);'],
-  ['assert.instanceOf(foo, bar, baz);', 'expect(foo).toBeInstanceOf(bar);'],
-  ['assert.notInstanceOf(foo, bar, baz);', 'expect(foo).not.toBeInstanceOf(bar);'],
-  ['assert.include(foo, bar, baz);', 'expect(foo).toContain(bar);'],
-  ['assert.notInclude(foo, bar, baz);', 'expect(foo).not.toContain(bar);'],
-  ['assert.match(foo, bar, baz);', 'expect(foo).toMatch(bar);'],
-  ['assert.notMatch(foo, bar, baz);', 'expect(foo).not.toMatch(bar);'],
-  ['assert.property(foo, bar, baz);', 'expect(bar in foo).toBeTruthy();'],
-  ['assert.notProperty(foo, bar, baz);', 'expect(bar in foo).toBeFalsy();'],
-  [
-    "assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green');",
-    "expect({ tea: { green: 'matcha' }}).toHaveProperty('tea.green');",
-  ],
-  [
-    "assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong');",
-    "expect({ tea: { green: 'matcha' }}).not.toHaveProperty('tea.oolong');",
-  ],
-  ['assert.propertyVal(foo, bar, baz);', 'expect(foo.bar).toBe(baz);'],
-  ['assert.propertyNotVal(foo, bar, baz);', 'expect(foo.bar).not.toBe(baz);'],
-  ['assert.notPropertyVal(foo, bar, baz);', 'expect(foo.bar).not.toBe(baz);'],
-  ['assert.nestedProperty(foo, bar);', 'expect(foo).toHaveProperty(bar);'],
-  ['assert.notNestedProperty(foo, bar);', 'expect(foo).not.toHaveProperty(bar);'],
-  ['assert.nestedPropertyVal(foo, bar, baz);', 'expect(foo).toHaveProperty(bar, baz);'],
-  [
-    'assert.notNestedPropertyVal(foo, bar, baz);',
-    'expect(foo).not.toHaveProperty(bar, baz);',
-  ],
-  [
-    "assert.deepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'matcha' });",
-    "expect({ tea: { green: 'matcha' } }).toHaveProperty('tea', { green: 'matcha' });",
-  ],
-  [
-    "assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { black: 'matcha' });",
-    "expect({ tea: { green: 'matcha' } }).not.toHaveProperty('tea', { black: 'matcha' });",
-  ],
-  [
-    "assert.deepPropertyNotVal({ tea: { green: 'matcha' } }, 'tea', { green: 'oolong' });",
-    "expect({ tea: { green: 'matcha' } }).not.toHaveProperty('tea', { green: 'oolong' });",
-  ],
-  [
-    "assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'oolong' });",
-    "expect({ tea: { green: 'matcha' } }).not.toHaveProperty('tea', { green: 'oolong' });",
-  ],
-  [
-    "assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'coffee', { green: 'matcha' });",
-    "expect({ tea: { green: 'matcha' } }).not.toHaveProperty('coffee', { green: 'matcha' });",
-  ],
-  ['assert.lengthOf(foo, bar, baz);', 'expect(foo.length).toBe(bar);'],
-  ['assert.throws(foo, bar, baz);', 'expect(foo).toThrow();'],
-  ['assert.doesNotThrow(foo, bar, baz);', 'expect(foo).not.toThrow();'],
-  [
-    'assert.closeTo(foo, bar, baz, msg);',
-    'expect(Math.abs(foo - bar)).toBeLessThanOrEqual(baz);',
-  ],
-  [
-    'assert.approximately(foo, bar, baz);',
-    'expect(Math.abs(foo - bar)).toBeLessThanOrEqual(baz);',
-  ],
-  ['assert.sameMembers(foo, bar, baz);', 'expect(foo).toEqual(bar);'],
-  ['assert.sameDeepMembers(foo, bar, baz);', 'expect(foo).toEqual(bar);'],
-  ['assert.ifError(foo);', 'expect(foo).toBeFalsy();'],
-  [
-    'assert.includeMembers([1, 2, 3], [2, 1, 2]);',
-    'expect([1, 2, 3]).toEqual(expect.arrayContaining([2, 1, 2]));',
-  ],
-  [
-    'assert.notIncludeMembers([1, 2, 3], [5, 1]);',
-    'expect([1, 2, 3]).not.toEqual(expect.arrayContaining([5, 1]));',
-  ],
-  [
-    'assert.includeDeepMembers([{ a: 1 }, { b: 2 }, { c: 3 }], [{ b: 2 }, { a: 1 }, { b: 2 }]);',
-    'expect([{ a: 1 }, { b: 2 }, { c: 3 }]).toEqual(expect.arrayContaining([{ b: 2 }, { a: 1 }, { b: 2 }]));',
-  ],
-  [
-    'assert.notIncludeDeepMembers([{ a: 1 }, { b: 2 }, { c: 3 }], [{ b: 2 }, { f: 5 }]);',
-    'expect([{ a: 1 }, { b: 2 }, { c: 3 }]).not.toEqual(expect.arrayContaining([{ b: 2 }, { f: 5 }]));',
-  ],
-  ['assert.isExtensible(foo);', 'expect(Object.isExtensible(foo)).toBe(true);'],
-  ['assert.isNotExtensible(foo);', 'expect(Object.isExtensible(foo)).not.toBe(true);'],
-  ['assert.isSealed(foo);', 'expect(Object.isSealed(foo)).toBe(true);'],
-  ['assert.isNotSealed(foo);', 'expect(Object.isSealed(foo)).not.toBe(true);'],
-  ['assert.isFrozen(foo);', 'expect(Object.isFrozen(foo)).toBe(true);'],
-  ['assert.isNotFrozen(foo);', 'expect(Object.isFrozen(foo)).not.toBe(true);'],
-]
+  )
+})
 
-const mappingTest = mappings.reduce(
-  (test, [assert, expect]) => ({
-    input: `
+describe('Mapping Test', () => {
+  const mappings = [
+    // follow the ordering here: http://chaijs.com/api/assert/
+    ['assert(foo === bar, baz);', 'expect(foo === bar).toBeTruthy();'],
+    ['assert(Array.isArray([]));', 'expect(Array.isArray([])).toBeTruthy();'],
+    ['assert.fail(foo, bar, baz);', 'expect(false).toBe(true);'],
+    ['assert.isOk(foo, msg);', 'expect(foo).toBeTruthy();'],
+    ['assert.isNotOk(foo);', 'expect(foo).toBeFalsy();'],
+    ['assert.equal(foo, bar, baz);', 'expect(foo).toEqual(bar);'],
+    ['assert.notEqual(foo, bar, baz);', 'expect(foo).not.toEqual(bar);'],
+    ['assert.strictEqual(foo, bar, baz);', 'expect(foo).toBe(bar);'],
+    ['assert.notStrictEqual(foo, bar, baz);', 'expect(foo).not.toBe(bar);'],
+    ['assert.deepEqual(foo, bar, baz);', 'expect(foo).toEqual(bar);'],
+    ['assert.notDeepEqual(foo, bar, baz);', 'expect(foo).not.toEqual(bar);'],
+    ['assert.isAbove(foo, bar, baz);', 'expect(foo).toBeGreaterThan(bar);'],
+    ['assert.isAtLeast(foo, bar, baz);', 'expect(foo).toBeGreaterThanOrEqual(bar);'],
+    ['assert.isBelow(foo, bar, baz);', 'expect(foo).toBeLessThan(bar);'],
+    ['assert.isAtMost(foo, bar, baz);', 'expect(foo).toBeLessThanOrEqual(bar);'],
+    ['assert.isTrue(foo);', 'expect(foo).toBe(true);'],
+    ['assert.isTrue(foo, msg);', 'expect(foo).toBe(true);'],
+    ['assert.isNotTrue(foo, msg);', 'expect(foo).not.toBe(true);'],
+    ['assert.isFalse(foo, msg);', 'expect(foo).toBe(false);'],
+    ['assert.isNotFalse(foo, msg);', 'expect(foo).not.toBe(false);'],
+    ['assert.isNull(foo, msg);', 'expect(foo).toBeNull();'],
+    ['assert.isNotNull(foo, msg);', 'expect(foo).not.toBeNull();'],
+    ['assert.isNaN(foo, msg);', 'expect(foo).toBe();'],
+    ['assert.isNotNaN(foo, msg);', 'expect(foo).not.toBe();'],
+    ['assert.isUndefined(foo, msg);', 'expect(foo).not.toBeDefined();'],
+    ['assert.isDefined(foo, msg);', 'expect(foo).toBeDefined();'],
+    ['assert.isFunction(foo, msg);', "expect(typeof foo).toBe('function');"],
+    ['assert.isNotFunction(foo, msg);', "expect(typeof foo).not.toBe('function');"],
+    ['assert.isObject(foo, msg);', "expect(typeof foo).toBe('object');"],
+    ['assert.isNotObject(foo, msg);', "expect(typeof foo).not.toBe('object');"],
+    ['assert.isArray(foo, msg);', 'expect(Array.isArray(foo)).toBe(true);'],
+    ['assert.isNotArray(foo, msg);', 'expect(Array.isArray(foo)).not.toBe(true);'],
+    ['assert.isString(foo, msg);', "expect(typeof foo).toBe('string');"],
+    ['assert.isNotString(foo, msg);', "expect(typeof foo).not.toBe('string');"],
+    ['assert.isNumber(foo, msg);', "expect(typeof foo).toBe('number');"],
+    ['assert.isNotNumber(foo, msg);', "expect(typeof foo).not.toBe('number');"],
+    ['assert.isBoolean(foo, msg);', "expect(typeof foo).toBe('boolean');"],
+    ['assert.isNotBoolean(foo, msg);', "expect(typeof foo).not.toBe('boolean');"],
+    ['assert.typeOf(foo, bar, baz);', 'expect(typeof foo).toBe(bar);'],
+    ['assert.notTypeOf(foo, bar, baz);', 'expect(typeof foo).not.toBe(bar);'],
+    ['assert.instanceOf(foo, bar, baz);', 'expect(foo).toBeInstanceOf(bar);'],
+    ['assert.notInstanceOf(foo, bar, baz);', 'expect(foo).not.toBeInstanceOf(bar);'],
+    ['assert.include(foo, bar, baz);', 'expect(foo).toContain(bar);'],
+    ['assert.notInclude(foo, bar, baz);', 'expect(foo).not.toContain(bar);'],
+    ['assert.match(foo, bar, baz);', 'expect(foo).toMatch(bar);'],
+    ['assert.notMatch(foo, bar, baz);', 'expect(foo).not.toMatch(bar);'],
+    ['assert.property(foo, bar, baz);', 'expect(bar in foo).toBeTruthy();'],
+    ['assert.notProperty(foo, bar, baz);', 'expect(bar in foo).toBeFalsy();'],
+    [
+      "assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green');",
+      "expect({ tea: { green: 'matcha' }}).toHaveProperty('tea.green');",
+    ],
+    [
+      "assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong');",
+      "expect({ tea: { green: 'matcha' }}).not.toHaveProperty('tea.oolong');",
+    ],
+    ['assert.propertyVal(foo, bar, baz);', 'expect(foo.bar).toBe(baz);'],
+    ['assert.propertyNotVal(foo, bar, baz);', 'expect(foo.bar).not.toBe(baz);'],
+    ['assert.notPropertyVal(foo, bar, baz);', 'expect(foo.bar).not.toBe(baz);'],
+    ['assert.nestedProperty(foo, bar);', 'expect(foo).toHaveProperty(bar);'],
+    ['assert.notNestedProperty(foo, bar);', 'expect(foo).not.toHaveProperty(bar);'],
+    ['assert.nestedPropertyVal(foo, bar, baz);', 'expect(foo).toHaveProperty(bar, baz);'],
+    [
+      'assert.notNestedPropertyVal(foo, bar, baz);',
+      'expect(foo).not.toHaveProperty(bar, baz);',
+    ],
+    [
+      "assert.deepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'matcha' });",
+      "expect({ tea: { green: 'matcha' } }).toHaveProperty('tea', { green: 'matcha' });",
+    ],
+    [
+      "assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { black: 'matcha' });",
+      "expect({ tea: { green: 'matcha' } }).not.toHaveProperty('tea', { black: 'matcha' });",
+    ],
+    [
+      "assert.deepPropertyNotVal({ tea: { green: 'matcha' } }, 'tea', { green: 'oolong' });",
+      "expect({ tea: { green: 'matcha' } }).not.toHaveProperty('tea', { green: 'oolong' });",
+    ],
+    [
+      "assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'oolong' });",
+      "expect({ tea: { green: 'matcha' } }).not.toHaveProperty('tea', { green: 'oolong' });",
+    ],
+    [
+      "assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'coffee', { green: 'matcha' });",
+      "expect({ tea: { green: 'matcha' } }).not.toHaveProperty('coffee', { green: 'matcha' });",
+    ],
+    ['assert.lengthOf(foo, bar, baz);', 'expect(foo.length).toBe(bar);'],
+    ['assert.throws(foo, bar, baz);', 'expect(foo).toThrow();'],
+    ['assert.doesNotThrow(foo, bar, baz);', 'expect(foo).not.toThrow();'],
+    [
+      'assert.closeTo(foo, bar, baz, msg);',
+      'expect(Math.abs(foo - bar)).toBeLessThanOrEqual(baz);',
+    ],
+    [
+      'assert.approximately(foo, bar, baz);',
+      'expect(Math.abs(foo - bar)).toBeLessThanOrEqual(baz);',
+    ],
+    ['assert.sameMembers(foo, bar, baz);', 'expect(foo).toEqual(bar);'],
+    ['assert.sameDeepMembers(foo, bar, baz);', 'expect(foo).toEqual(bar);'],
+    ['assert.ifError(foo);', 'expect(foo).toBeFalsy();'],
+    [
+      'assert.includeMembers([1, 2, 3], [2, 1, 2]);',
+      'expect([1, 2, 3]).toEqual(expect.arrayContaining([2, 1, 2]));',
+    ],
+    [
+      'assert.notIncludeMembers([1, 2, 3], [5, 1]);',
+      'expect([1, 2, 3]).not.toEqual(expect.arrayContaining([5, 1]));',
+    ],
+    [
+      'assert.includeDeepMembers([{ a: 1 }, { b: 2 }, { c: 3 }], [{ b: 2 }, { a: 1 }, { b: 2 }]);',
+      'expect([{ a: 1 }, { b: 2 }, { c: 3 }]).toEqual(expect.arrayContaining([{ b: 2 }, { a: 1 }, { b: 2 }]));',
+    ],
+    [
+      'assert.notIncludeDeepMembers([{ a: 1 }, { b: 2 }, { c: 3 }], [{ b: 2 }, { f: 5 }]);',
+      'expect([{ a: 1 }, { b: 2 }, { c: 3 }]).not.toEqual(expect.arrayContaining([{ b: 2 }, { f: 5 }]));',
+    ],
+    ['assert.isExtensible(foo);', 'expect(Object.isExtensible(foo)).toBe(true);'],
+    ['assert.isNotExtensible(foo);', 'expect(Object.isExtensible(foo)).not.toBe(true);'],
+    ['assert.isSealed(foo);', 'expect(Object.isSealed(foo)).toBe(true);'],
+    ['assert.isNotSealed(foo);', 'expect(Object.isSealed(foo)).not.toBe(true);'],
+    ['assert.isFrozen(foo);', 'expect(Object.isFrozen(foo)).toBe(true);'],
+    ['assert.isNotFrozen(foo);', 'expect(Object.isFrozen(foo)).not.toBe(true);'],
+  ]
+  const mappingTest = mappings.reduce(
+    (test, [assert, expect]) => ({
+      input: `
 ${test.input}
 ${assert}
 `,
-    output: `
+      output: `
 ${test.output}
 ${expect}
 `,
-  }),
-  {
-    input: `
+    }),
+    {
+      input: `
 // @flow
 import { assert } from 'chai';`,
-    output: `
+      output: `
 // @flow`,
-  }
-)
+    }
+  )
 
-testChanged('mappings', mappingTest.input, mappingTest.output)
+  test('mappings', () => {
+    expectTransformation(mappingTest.input, mappingTest.output)
+  })
 
-testChanged(
-  'mapping without import if skipImportDetection is set',
-  mappingTest.input.replace("import { assert } from 'chai';\n", ''),
-  mappingTest.output,
-  { skipImportDetection: true }
-)
+  test('mapping without import if skipImportDetection is set', () => {
+    expectTransformation(
+      mappingTest.input.replace("import { assert } from 'chai';\n", ''),
+      mappingTest.output,
+      { skipImportDetection: true }
+    )
+  })
+})
 
 test('not supported assertions', () => {
   const unsupportedAssertions = [
@@ -242,28 +247,30 @@ assert.${assertion}(foo, bar, baz);`,
   ])
 })
 
-testChanged(
-  'applies when chai default import used',
-  `
+test('applies when chai default import used', () => {
+  expectTransformation(
+    `
 // @flow
 import chai from 'chai';
 chai.assert.equal(foo, bar, baz);
 `,
-  `
+    `
 // @flow
 expect(foo).toEqual(bar);
 `
-)
+  )
+})
 
-testChanged(
-  'transforms renamed imports',
-  `
+test('transforms renamed imports', () => {
+  expectTransformation(
+    `
 // @flow
 import { assert as myCoolAssert } from 'chai';
 myCoolAssert.equal(foo, bar, baz);
 `,
-  `
+    `
 // @flow
 expect(foo).toEqual(bar);
 `
-)
+  )
+})
diff --git a/src/transformers/chai-should.test.ts b/src/transformers/chai-should.test.ts
index 0e30a83..fd97d7d 100644
--- a/src/transformers/chai-should.test.ts
+++ b/src/transformers/chai-should.test.ts
@@ -13,17 +13,15 @@ beforeEach(() => {
   console.warn = (v) => consoleWarnings.push(v)
 })
 
-function testChanged(msg, source, expectedOutput) {
-  test(msg, () => {
-    const result = wrappedPlugin(source)
-    expect(result).toBe(expectedOutput)
-    expect(consoleWarnings).toEqual([])
-  })
+function expectTransformation(source, expectedOutput) {
+  const result = wrappedPlugin(source)
+  expect(result).toBe(expectedOutput)
+  expect(consoleWarnings).toEqual([])
 }
 
-testChanged(
-  'removes imports and does basic conversions of should and expect',
-  `
+test('removes imports and does basic conversions of should and expect', () => {
+  expectTransformation(
+    `
         var expect = require('chai').expect;
 
         describe('Instantiating TextField', () => {
@@ -33,7 +31,7 @@ testChanged(
             });
         });
     `,
-  `
+    `
         describe('Instantiating TextField', () => {
             it('should set the placeholder correctly', () => {
                 expect(textField.props.placeholder).toBe(PLACEHOLDER);
@@ -41,11 +39,12 @@ testChanged(
             });
         });
     `
-)
+  )
+})
 
-testChanged(
-  'removes imports and does basic conversions of should and expect',
-  `
+test('removes imports and does basic conversions of should and expect (2)', () => {
+  expectTransformation(
+    `
         const { expect } = require('chai');
         var should = require('chai').should();
 
@@ -68,7 +67,7 @@ testChanged(
             thing1.equal(thing2);
         });
     `,
-  `
+    `
         describe('Instantiating TextField', () => {
             it('should set the placeholder correctly', () => {
                 expect(textField.props.placeholder).toBe(PLACEHOLDER);
@@ -88,11 +87,12 @@ testChanged(
             thing1.equal(thing2);
         });
     `
-)
+  )
+})
 
-testChanged(
-  'removes imports (case where should is not assigned)',
-  `
+test('removes imports (case where should is not assigned)', () => {
+  expectTransformation(
+    `
         require('chai').should();
 
         describe('Instantiating TextField', () => {
@@ -101,31 +101,33 @@ testChanged(
               textField.props.placeholder.should.not.equal(PLACEHOLDER);
           });
         });`,
-  `
+    `
         describe('Instantiating TextField', () => {
           it('should set the placeholder correctly', () => {
               expect(textField.props.placeholder).toBe(PLACEHOLDER);
               expect(textField.props.placeholder).not.toBe(PLACEHOLDER);
           });
         });`
-)
+  )
+})
 
-testChanged(
-  'Removes complicated import',
-  `
+test('Removes complicated import', () => {
+  expectTransformation(
+    `
         const chai = require('chai');
         const expect = chai.expect;
 
         expect(foo).to.be.true;
     `,
-  `
+    `
         expect(foo).toBe(true);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "a-an"',
-  `
+test('converts "a-an"', () => {
+  expectTransformation(
+    `
         expect('test').to.be.a('string', 'error message');
         expect({ foo: 'bar' }).to.be.an('object');
         expect({ foo: 'bar' }).to.be.an(Object);
@@ -144,7 +146,7 @@ testChanged(
 
         'test'.should.be.a('string');
     `,
-  `
+    `
         expect(typeof 'test').toBe('string');
         expect({ foo: 'bar' }).toBeInstanceOf(Object);
         expect({ foo: 'bar' }).toBeInstanceOf(Object);
@@ -163,25 +165,27 @@ testChanged(
 
         expect(typeof 'test').toBe('string');
     `
-)
+  )
+})
 
-testChanged(
-  'converts "above"',
-  `
+test('converts "above"', () => {
+  expectTransformation(
+    `
         expect(10).to.be.above(5);
         expect(10).to.be.gt(5);
         expect(10).to.be.greaterThan(5);
     `,
-  `
+    `
         expect(10).toBeGreaterThan(5);
         expect(10).toBeGreaterThan(5);
         expect(10).toBeGreaterThan(5);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "below"',
-  `
+test('converts "below"', () => {
+  expectTransformation(
+    `
         expect(5).to.be.below(10);
         expect(5).to.be.below(10, 'error message');
         expect(3).to.be.at.below(5);
@@ -190,7 +194,7 @@ testChanged(
         (1).should.be.lessThan(5);
         (1).should.be.lt(5);
     `,
-  `
+    `
         expect(5).toBeLessThan(10);
         expect(5).toBeLessThan(10);
         expect(3).toBeLessThan(5);
@@ -199,11 +203,12 @@ testChanged(
         expect(1).toBeLessThan(5);
         expect(1).toBeLessThan(5);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "eql"',
-  `
+test('converts "eql"', () => {
+  expectTransformation(
+    `
         expect({ foo: 'bar' }).to.eql({ foo: 'bar' });
         expect([1, 2, 3]).to.eql([1, 2, 3]);
         a.should.eql(a);
@@ -211,7 +216,7 @@ testChanged(
         expect("123").to.eql("123");
         expect("123").to.not.eql("123");
     `,
-  `
+    `
         expect({ foo: 'bar' }).toEqual({ foo: 'bar' });
         expect([1, 2, 3]).toEqual([1, 2, 3]);
         expect(a).toEqual(a);
@@ -219,11 +224,12 @@ testChanged(
         expect("123").toBe("123");
         expect("123").not.toBe("123");
     `
-)
+  )
+})
 
-testChanged(
-  'converts "equal"',
-  `
+test('converts "equal"', () => {
+  expectTransformation(
+    `
         expect('hello').to.equal('hello');
         expect('hello', 'some message here explaining hello').to.equal('hello');
         expect(42).to.equal(42);
@@ -234,7 +240,7 @@ testChanged(
         should.equal('foo', 'foo');
         should.not.equal('foo', 'bar');
     `,
-  `
+    `
         expect('hello').toBe('hello');
         // some message here explaining hello
         expect('hello').toBe('hello');
@@ -246,11 +252,12 @@ testChanged(
         expect('foo').toBe('foo');
         expect('foo').not.toBe('bar');
     `
-)
+  )
+})
 
-testChanged(
-  'converts "exist-defined"',
-  `
+test('converts "exist-defined"', () => {
+  expectTransformation(
+    `
         expect(foo).to.exist;
         expect(bar).to.not.exist;
         expect(baz).to.not.exist;
@@ -262,7 +269,7 @@ testChanged(
 
         should.exist('');
     `,
-  `
+    `
         expect(foo).toBeDefined();
         expect(bar).toBeFalsy();
         expect(baz).toBeFalsy();
@@ -274,175 +281,188 @@ testChanged(
 
         expect('').toBeDefined();
     `
-)
+  )
+})
 
-testChanged(
-  'converts "extensible"',
-  `
+test('converts "extensible"', () => {
+  expectTransformation(
+    `
         expect(nonExtensibleObject).to.not.be.extensible;
         expect({}).to.be.extensible;
         expect({}).to.be.extensible();
         x.should.be.extensible;
         x.should.be.extensible();
     `,
-  `
+    `
         expect(Object.isExtensible(nonExtensibleObject)).toBe(false);
         expect(Object.isExtensible({})).toBe(true);
         expect(Object.isExtensible({})).toBe(true);
         expect(Object.isExtensible(x)).toBe(true);
         expect(Object.isExtensible(x)).toBe(true);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "empty"',
-  `
+test('converts "empty"', () => {
+  expectTransformation(
+    `
         expect([]).to.be.empty;
         expect('').to.be.empty;
         expect(v).to.be.empty;
         expect({}).to.be.empty;
         expect(wrapper.find('.failure-message').length).to.be.empty;
   `,
-  `
+    `
         expect([]).toHaveLength(0);
         expect('').toHaveLength(0);
         expect(Object.keys(v)).toHaveLength(0);
         expect(Object.keys({})).toHaveLength(0);
         expect(wrapper.find('.failure-message')).toHaveLength(0);
   `
-)
+  )
+})
 
-testChanged(
-  'converts "false"',
-  `
+test('converts "false"', () => {
+  expectTransformation(
+    `
         expect(false).to.be.false;
         expect(0).to.not.be.false;
         expect(foo + bar).to.be.false;
     `,
-  `
+    `
         expect(false).toBe(false);
         expect(0).not.toBe(false);
         expect(foo + bar).toBe(false);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "finite"',
-  `
+test('converts "finite"', () => {
+  expectTransformation(
+    `
         (Infinity).should.not.be.finite;
         (-10).should.be.finite;
     `,
-  `
+    `
         expect(isFinite(Infinity)).toBe(false);
         expect(isFinite(-10)).toBe(true);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "frozen"',
-  `
+test('converts "frozen"', () => {
+  expectTransformation(
+    `
         expect(frozenObject).to.be.frozen;
         expect({}).to.not.be.frozen;
     `,
-  `
+    `
         expect(Object.isFrozen(frozenObject)).toBe(true);
         expect(Object.isFrozen({})).toBe(false);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "string"',
-  `
+test('converts "string"', () => {
+  expectTransformation(
+    `
         expect('foobar').to.have.string('bar');
         expect('foobar').not.to.have.string('z');
         expect(someString).to.have.string('bar');
         expect(someString).not.to.have.string('bar');
     `,
-  `
+    `
         expect('foobar').toContain('bar');
         expect('foobar').not.toContain('z');
         expect(someString).toContain('bar');
         expect(someString).not.toContain('bar');
     `
-)
+  )
+})
 
-testChanged(
-  'converts "includes-contains"',
-  `
+test('converts "includes-contains"', () => {
+  expectTransformation(
+    `
         expect('foobar').to.contain('foo');
         expect([1, 2, 3]).to.include(2);
         expect('foobar').which.contains('foo');
         expect({ foo: 1, bar: 2 }).to.contain({ bar: 2 });
     `,
-  `
+    `
         expect('foobar').toContain('foo');
         expect([1, 2, 3]).toEqual(expect.arrayContaining([2]));
         expect('foobar').toContain('foo');
         expect({ foo: 1, bar: 2 }).toMatchObject({ bar: 2 });
     `
-)
+  )
+})
 
-testChanged(
-  'converts chained "includes-contains"',
-  `
+test('converts chained "includes-contains"', () => {
+  expectTransformation(
+    `
         expect([1, 2, 3]).to.be.an('array').that.includes(2);
         expect(arr).to.be.an('array').that.does.not.include(3);
     `,
-  `
+    `
         expect([1, 2, 3]).toEqual(expect.arrayContaining([2]));
         expect(arr).toEqual(expect.not.arrayContaining([3]));
     `
-)
+  )
+})
 
-testChanged(
-  'converts empty array assertion',
-  `
+test('converts empty array assertion', () => {
+  expectTransformation(
+    `
         expect(arr).to.be.an('array').that.is.empty;
     `,
-  `
+    `
         expect(arr).toEqual([]);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "instanceof"',
-  `
+test('converts "instanceof"', () => {
+  expectTransformation(
+    `
         expect(foo).to.be.an.instanceof(Foo);
         expect(foo).not.to.be.an.instanceof(Foo);
         expect(123).to.be.instanceof(Number);
     `,
-  `
+    `
         expect(foo).toBeInstanceOf(Foo);
         expect(foo).not.toBeInstanceOf(Foo);
         expect(123).toBeInstanceOf(Number);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "keys"',
-  `
+test('converts "keys"', () => {
+  expectTransformation(
+    `
         expect([1, 2, 3]).to.have.all.keys(1, 2);
         expect({ foo: 1, bar: 2 }).to.have.all.keys({ bar: 6, foo: 7 });
         expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys(['bar', 'foo']);
         expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys({ bar: 6 });
     `,
-  `
+    `
         expect([1, 2, 3]).toEqual(expect.arrayContaining([1, 2]));
         expect(Object.keys({ foo: 1, bar: 2 })).toEqual(expect.arrayContaining(Object.keys({ bar: 6, foo: 7 })));
         expect(Object.keys({ foo: 1, bar: 2, baz: 3 })).toEqual(expect.arrayContaining(['bar', 'foo']));
         expect(Object.keys({ foo: 1, bar: 2, baz: 3 })).toEqual(expect.arrayContaining(Object.keys({ bar: 6 })));
     `
-)
+  )
+})
 
-testChanged(
-  'converts "least"',
-  `expect(10).to.be.at.least(10);`,
-  `expect(10).toBeGreaterThanOrEqual(10);`
-)
+test('converts "least"', () => {
+  expectTransformation(
+    `expect(10).to.be.at.least(10);`,
+    `expect(10).toBeGreaterThanOrEqual(10);`
+  )
+})
 
-testChanged(
-  'converts "length"',
-  `
+test('converts "length"', () => {
+  expectTransformation(
+    `
         expect('foo').to.have.length(3);
         expect([1,2]).to.have.length(2);
 
@@ -450,7 +470,7 @@ testChanged(
         expect([1,2]).to.have.length.of.at.most(4);
         expect(anArray).to.have.length.above(2);
     `,
-  `
+    `
         expect('foo').toHaveLength(3);
         expect([1,2]).toHaveLength(2);
 
@@ -458,31 +478,34 @@ testChanged(
         expect([1,2].length).toBeLessThanOrEqual(4);
         expect(anArray.length).toBeGreaterThan(2);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "lengthof"',
-  `
+test('converts "lengthof"', () => {
+  expectTransformation(
+    `
         expect([1, 2, 3]).to.have.lengthOf(3);
         expect('foobar').to.have.lengthOf(6);
         'test'.should.have.lengthOf(4);
     `,
-  `
+    `
         expect([1, 2, 3]).toHaveLength(3);
         expect('foobar').toHaveLength(6);
         expect('test').toHaveLength(4);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "match"',
-  `expect('foobar').to.match(/^foo/);`,
-  `expect('foobar').toMatch(/^foo/);`
-)
+test('converts "match"', () => {
+  expectTransformation(
+    `expect('foobar').to.match(/^foo/);`,
+    `expect('foobar').toMatch(/^foo/);`
+  )
+})
 
-testChanged(
-  'converts "members"',
-  `
+test('converts "members"', () => {
+  expectTransformation(
+    `
         expect([1, 2, 3]).to.include.members([3, 2]);
         expect([1, 2, 3]).to.not.include.members([3, 2, 8]);
 
@@ -493,7 +516,7 @@ testChanged(
 
         expect({ id: 1 }).to.include.members({ id: 1 });
     `,
-  `
+    `
         expect([1, 2, 3]).toEqual(expect.arrayContaining([3, 2]));
         expect([1, 2, 3]).not.toEqual(expect.arrayContaining([3, 2, 8]));
 
@@ -504,41 +527,42 @@ testChanged(
 
         expect({ id: 1 }).toEqual(expect.objectContaining({ id: 1 }));
     `
-)
+  )
+})
 
-testChanged(
-  'converts "most"',
-  `expect(5).to.be.at.most(5);`,
-  `expect(5).toBeLessThanOrEqual(5);`
-)
+test('converts "most"', () => {
+  expectTransformation(`expect(5).to.be.at.most(5);`, `expect(5).toBeLessThanOrEqual(5);`)
+})
 
-testChanged(
-  'converts "nan"',
-  `
+test('converts "nan"', () => {
+  expectTransformation(
+    `
         expect('foo').to.be.NaN;
         expect(4).not.to.be.NaN;
     `,
-  `
+    `
         expect('foo').toBeNaN();
         expect(4).not.toBeNaN();
     `
-)
+  )
+})
 
-testChanged(
-  'converts "null"',
-  `
+test('converts "null"', () => {
+  expectTransformation(
+    `
         expect(null).to.be.null;
         expect(undefined).to.not.be.null;
     `,
-  `
+    `
         expect(null).toBeNull();
         expect(undefined).not.toBeNull();
     `
-)
+  )
+})
 
-testChanged(
-  'converts "ok"',
-  `
+test('converts "ok"', () => {
+  expectTransformation(
+    `
         expect('everything').to.be.ok;
         expect(1).to.be.ok;
         expect(false).to.not.be.ok;
@@ -551,7 +575,7 @@ testChanged(
         expect(x.ok).toBeTruthy();
         expect(x.ok).to.be.ok;
         `,
-  `
+    `
         expect('everything').toBeTruthy();
         expect(1).toBeTruthy();
         expect(false).toBeFalsy();
@@ -564,57 +588,62 @@ testChanged(
         expect(x.ok).toBeTruthy();
         expect(x.ok).toBeTruthy();
         `
-)
+  )
+})
 
-testChanged(
-  'converts "ownproperty"',
-  `expect('test').to.have.ownProperty('length')`,
-  `expect('test'.hasOwnProperty('length')).toBeTruthy()`
-)
+test('converts "ownproperty"', () => {
+  expectTransformation(
+    `expect('test').to.have.ownProperty('length')`,
+    `expect('test'.hasOwnProperty('length')).toBeTruthy()`
+  )
+})
 
-testChanged(
-  'converts "ownpropertydescriptor"',
-  `
+test('converts "ownpropertydescriptor"', () => {
+  expectTransformation(
+    `
         expect('test').to.have.ownPropertyDescriptor('length');
         expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 });
         expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 });
     `,
-  `
+    `
         expect(Object.getOwnPropertyDescriptor('test', 'length')).not.toBeUndefined();
         expect(Object.getOwnPropertyDescriptor('test', 'length')).toEqual({ enumerable: false, configurable: false, writable: false, value: 4 });
         expect(Object.getOwnPropertyDescriptor('test', 'length')).toEqual({ enumerable: false, configurable: false, writable: false, value: 3 });
     `
-)
+  )
+})
 
-testChanged(
-  'converts "property"',
-  `
+test('converts "property"', () => {
+  expectTransformation(
+    `
         expect(deepObj).to.have.deep.property("green.tea", "matcha");
         expect(obj).to.have.property("foo");
         expect(obj).to.have.property("foo", "bar");
     `,
-  `
+    `
         expect(deepObj).toHaveProperty("green.tea", "matcha");
         expect(obj).toHaveProperty("foo");
         expect(obj).toHaveProperty("foo", "bar");
     `
-)
+  )
+})
 
-testChanged(
-  'converts "sealed"',
-  `
+test('converts "sealed"', () => {
+  expectTransformation(
+    `
         expect(sealedObject).to.be.sealed;
         expect({}).to.not.be.sealed;
     `,
-  `
+    `
         expect(Object.isSealed(sealedObject)).toBe(true);
         expect(Object.isSealed({})).toBe(false);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "throw"',
-  `
+test('converts "throw"', () => {
+  expectTransformation(
+    `
         const err = new ReferenceError('This is a bad function.');
         const fn = function() { throw err; };
         expect(fn).to.throw(ReferenceError);
@@ -624,7 +653,7 @@ testChanged(
         expect(fn).to.throw(ReferenceError, /bad function/);
         expect(fn).to.throw(err);
     `,
-  `
+    `
         const err = new ReferenceError('This is a bad function.');
         const fn = function() { throw err; };
         expect(fn).toThrowError(ReferenceError);
@@ -634,49 +663,53 @@ testChanged(
         expect(fn).toThrowError(ReferenceError);
         expect(fn).toThrowError(err);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "true"',
-  `
+test('converts "true"', () => {
+  expectTransformation(
+    `
         expect(true).to.be.true;
         expect(1).to.not.be.true;
         expect(true).to.be.true();
     `,
-  `
+    `
         expect(true).toBe(true);
         expect(1).not.toBe(true);
         expect(true).toBe(true);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "undefined"',
-  `
+test('converts "undefined"', () => {
+  expectTransformation(
+    `
         expect(undefined).to.be.undefined;
         expect(undefined).to.equal(undefined);
         expect(null).to.not.be.undefined;
         expect(null).to.not.be.undefined();
         expect(null).to.not.equal(undefined);
     `,
-  `
+    `
         expect(undefined).toBeUndefined();
         expect(undefined).toBeUndefined();
         expect(null).toBeDefined();
         expect(null).toBeDefined();
         expect(null).toBeDefined();
     `
-)
+  )
+})
 
-testChanged(
-  'converts "function"',
-  `
+test('converts "function"', () => {
+  expectTransformation(
+    `
         expect(foo).to.be.a.function;
     `,
-  `
+    `
         expect(foo).toBeInstanceOf(Function);
     `
-)
+  )
+})
 
 it('warns about using chai extensions', () => {
   wrappedPlugin(`
@@ -690,27 +723,28 @@ it('warns about using chai extensions', () => {
   ])
 })
 
-testChanged(
-  'does not convert "empty"',
-  `
+test('does not convert "empty"', () => {
+  expectTransformation(
+    `
         expect(foo.empty).to.be.undefined;
         const foo = rx.Observable.empty;
     `,
-  `
+    `
         expect(foo.empty).toBeUndefined();
         const foo = rx.Observable.empty;
     `
-)
+  )
+})
 
-testChanged(
-  'removes params to expect() except for the first',
-  `
+test('removes params to expect() except for the first', () => {
+  expectTransformation(
+    `
         expect(foo, 'Expected foo to be defined').to.exist;
         expect(foo, 'Expected foo to be defined').to.equal(true);
         expect(foo, \`Expected foo to be defined for \${id}\`).to.be.defined;
         expect(foo, 'Expected ' + foo + ' to be defined').to.equal(true);
     `,
-  `
+    `
         // Expected foo to be defined
         expect(foo).toBeDefined();
         // Expected foo to be defined
@@ -720,26 +754,28 @@ testChanged(
         // 'Expected ' + foo + ' to be defined'
         expect(foo).toBe(true);
     `
-)
+  )
+})
 
-testChanged(
-  'converts equal(null) to toBeNull()',
-  `
+test('converts equal(null) to toBeNull()', () => {
+  expectTransformation(
+    `
         expect(actual).to.equal(null);
     `,
-  `
+    `
         expect(actual).toBeNull();
     `
-)
+  )
+})
 
-testChanged(
-  'converts "within"',
-  `
+test('converts "within"', () => {
+  expectTransformation(
+    `
         expect(7).to.be.within(5, 10);
 
         (5).should.be.within(2, 4);
     `,
-  `
+    `
         expect(7).toBeGreaterThanOrEqual(5);
         expect(7).toBeLessThanOrEqual(10);
 
@@ -747,18 +783,19 @@ testChanged(
 
         expect(5).toBeLessThanOrEqual(4);
     `
-)
+  )
+})
 
-testChanged(
-  'converts "within" with length',
-  `
+test('converts "within" with length', () => {
+  expectTransformation(
+    `
         expect('foo').to.have.length.within(2, 4);
 
         expect([1, 2, 3]).to.have.length.within(2, 4);
 
         expect('foo').to.have.length.within(2, 4, 'error message');
     `,
-  `
+    `
         expect('foo'.length).toBeGreaterThanOrEqual(2);
         expect('foo'.length).toBeLessThanOrEqual(4);
 
@@ -770,7 +807,8 @@ testChanged(
 
         expect('foo'.length).toBeLessThanOrEqual(4);
     `
-)
+  )
+})
 
 it('warns about not supported assertions part 1', () => {
   wrappedPlugin(`
diff --git a/src/transformers/expect-js.test.ts b/src/transformers/expect-js.test.ts
index 6afaf42..8901dec 100644
--- a/src/transformers/expect-js.test.ts
+++ b/src/transformers/expect-js.test.ts
@@ -13,51 +13,51 @@ beforeEach(() => {
   console.warn = (v) => consoleWarnings.push(v)
 })
 
-function testChanged(msg, source, expectedOutput, options = {}) {
-  test(msg, () => {
-    const result = wrappedPlugin(source, options)
-    expect(result).toBe(expectedOutput)
-    expect(consoleWarnings).toEqual([])
-
-    // Running it twice should yield same result
-    expect(wrappedPlugin(result, options)).toBe(result)
-  })
+function expectTransformation(source, expectedOutput, options = {}) {
+  const result = wrappedPlugin(source, options)
+  expect(result).toBe(expectedOutput)
+  expect(consoleWarnings).toEqual([])
+
+  // Running it twice should yield same result
+  expect(wrappedPlugin(result, options)).toBe(result)
 }
 
-testChanged(
-  'does not touch code without expect require/import',
-  `
+test('does not touch code without expect require/import', () => {
+  expectTransformation(
+    `
     const test = require("testlib");
     test(t => {
       expect(stuff).to.be.ok();
     })
     `,
-  `
+    `
     const test = require("testlib");
     test(t => {
       expect(stuff).to.be.ok();
     })
     `
-)
+  )
+})
 
-testChanged(
-  'changes code without expect require/import if skipImportDetection is set',
-  `
+test('changes code without expect require/import if skipImportDetection is set', () => {
+  expectTransformation(
+    `
     test(t => {
       expect(stuff).to.be.ok();
     })
     `,
-  `
+    `
     test(t => {
       expect(stuff).toBeTruthy();
     })
     `,
-  { skipImportDetection: true }
-)
+    { skipImportDetection: true }
+  )
+})
 
-testChanged(
-  'maps expect matchers',
-  `
+test('maps expect matchers', () => {
+  expectTransformation(
+    `
     import expect from 'expect.js';
 
     test(() => {
@@ -80,7 +80,7 @@ testChanged(
       expect(stuff).to.match('message');
     });
     `,
-  `
+    `
     test(() => {
       expect(stuff).toBeTruthy();
       expect(stuff).toBeFalsy();
@@ -101,11 +101,12 @@ testChanged(
       expect(stuff).toMatch('message');
     });
     `
-)
+  )
+})
 
-testChanged(
-  'does not map non expect.js matchers',
-  `
+test('does not map non expect.js matchers', () => {
+  expectTransformation(
+    `
     import expect from 'expect.js';
 
     test(() => {
@@ -113,17 +114,18 @@ testChanged(
       expect(stuff).to.be.bananas();
     });
     `,
-  `
+    `
     test(() => {
       bob(stuff).to.be.ok();
       expect(stuff).to.be.bananas();
     });
     `
-)
+  )
+})
 
-testChanged(
-  'maps expect not matchers',
-  `
+test('maps expect not matchers', () => {
+  expectTransformation(
+    `
     import expect from 'expect.js';
 
     test(() => {
@@ -141,7 +143,7 @@ testChanged(
       expect(stuff).to.not.match('message');
     });
     `,
-  `
+    `
     test(() => {
       expect(stuff).not.toBe('message');
       expect(stuff).not.toBe('message');
@@ -157,11 +159,12 @@ testChanged(
       expect(stuff).not.toMatch('message');
     });
     `
-)
+  )
+})
 
-testChanged(
-  'maps expect number matchers',
-  `
+test('maps expect number matchers', () => {
+  expectTransformation(
+    `
     import expect from 'expect.js';
 
     test(() => {
@@ -173,7 +176,7 @@ testChanged(
       expect(stuff).to.be.gt(42);
     });
     `,
-  `
+    `
     test(() => {
       expect(stuff).toBeLessThan(42);
       expect(stuff).toBeLessThan(42);
@@ -183,11 +186,12 @@ testChanged(
       expect(stuff).toBeGreaterThan(42);
     });
     `
-)
+  )
+})
 
-testChanged(
-  'maps expect throw matchers',
-  `
+test('maps expect throw matchers', () => {
+  expectTransformation(
+    `
     import expect from 'expect.js';
 
     test(() => {
@@ -210,7 +214,7 @@ testChanged(
       });
     });
     `,
-  `
+    `
     test(() => {
       expect(stuff).toThrowError(Error);
       expect(stuff).toThrow();
@@ -245,27 +249,29 @@ testChanged(
       }
     });
     `
-)
+  )
+})
 
-testChanged(
-  'maps expect fail matchers',
-  `
+test('maps expect fail matchers', () => {
+  expectTransformation(
+    `
     import expect from 'expect.js';
 
     test(() => {
       expect().fail('message');
     });
     `,
-  `
+    `
     test(() => {
       throw Error('message');
     });
     `
-)
+  )
+})
 
-testChanged(
-  'maps expect a and an matchers',
-  `
+test('maps expect a and an matchers', () => {
+  expectTransformation(
+    `
     import expect from 'expect.js';
 
     test(() => {
@@ -288,7 +294,7 @@ testChanged(
       expect(stuff).to.be.an(Thing);
     });
     `,
-  `
+    `
     test(() => {
       expect(typeof stuff).toBe('function');
       expect(typeof stuff).toBe('string');
@@ -309,23 +315,25 @@ testChanged(
       expect(stuff).toBeInstanceOf(Thing);
     });
     `
-)
+  )
+})
 
-testChanged(
-  'maps expect within matchers',
-  `
+test('maps expect within matchers', () => {
+  expectTransformation(
+    `
     import expect from 'expect.js';
 
     test(() => {
       expect(stuff).to.be.within(0, 100);
     });
     `,
-  `
+    `
     test(() => {
       expect(stuff > 0 && stuff < 100).toBeTruthy();
     });
     `
-)
+  )
+})
 
 test('warns about unsupported matchers', () => {
   wrappedPlugin(`
@@ -340,9 +348,9 @@ test('warns about unsupported matchers', () => {
   ])
 })
 
-testChanged(
-  'standaloneMode: keeps Jest expect import',
-  `
+test('standaloneMode: keeps Jest expect import', () => {
+  expectTransformation(
+    `
     import expect from 'expect.js';
     import exp from 'expect';
 
@@ -350,14 +358,15 @@ testChanged(
       expect(stuff).to.be('message');
     });
     `,
-  `
+    `
     import exp from 'expect';
 
     test(() => {
       expect(stuff).toBe('message');
     });
     `,
-  {
-    standaloneMode: true,
-  }
-)
+    {
+      standaloneMode: true,
+    }
+  )
+})
diff --git a/src/transformers/expect.test.ts b/src/transformers/expect.test.ts
index 3d3eba5..03ef4ba 100644
--- a/src/transformers/expect.test.ts
+++ b/src/transformers/expect.test.ts
@@ -13,51 +13,51 @@ beforeEach(() => {
   console.warn = (v) => consoleWarnings.push(v)
 })
 
-function testChanged(msg, source, expectedOutput, options = {}) {
-  test(msg, () => {
-    const result = wrappedPlugin(source, options)
-    expect(result).toBe(expectedOutput)
-    expect(consoleWarnings).toEqual([])
-
-    // Running it twice should yield same result
-    expect(wrappedPlugin(result, options)).toBe(result)
-  })
+function expectTransformation(source, expectedOutput, options = {}) {
+  const result = wrappedPlugin(source, options)
+  expect(result).toBe(expectedOutput)
+  expect(consoleWarnings).toEqual([])
+
+  // Running it twice should yield same result
+  expect(wrappedPlugin(result, options)).toBe(result)
 }
 
-testChanged(
-  'does not touch code without expect require/import',
-  `
+test('does not touch code without expect require/import', () => {
+  expectTransformation(
+    `
     const test = require("testlib");
     test(t => {
       expect(stuff).toExist();
     })
     `,
-  `
+    `
     const test = require("testlib");
     test(t => {
       expect(stuff).toExist();
     })
     `
-)
+  )
+})
 
-testChanged(
-  'changes code without expect require/import if skipImportDetection is set',
-  `
+test('changes code without expect require/import if skipImportDetection is set', () => {
+  expectTransformation(
+    `
     test(t => {
       expect(stuff).toExist();
     })
     `,
-  `
+    `
     test(t => {
       expect(stuff).toBeTruthy();
     })
     `,
-  { skipImportDetection: true }
-)
+    { skipImportDetection: true }
+  )
+})
 
-testChanged(
-  'maps expect matchers',
-  `
+test('maps expect matchers', () => {
+  expectTransformation(
+    `
     import expect from 'expect';
 
     test(() => {
@@ -113,7 +113,7 @@ testChanged(
       expect(stuff).toHaveBeenCalledWith('foo', 'bar');
     });
     `,
-  `
+    `
     test(() => {
       expect(stuff).toBeTruthy();
       expect(stuff).toBeTruthy();
@@ -167,11 +167,12 @@ testChanged(
       expect(stuff).toHaveBeenCalledWith('foo', 'bar');
     });
     `
-)
+  )
+})
 
-testChanged(
-  'maps expect number matchers',
-  `
+test('maps expect number matchers', () => {
+  expectTransformation(
+    `
     import expect from 'expect';
 
     test(() => {
@@ -182,7 +183,7 @@ testChanged(
       expect(stuff).toBeGreaterThanOrEqualTo(42);
     });
     `,
-  `
+    `
     test(() => {
       expect(stuff).toBeLessThan(42);
       expect(stuff).toBeLessThan(42);
@@ -191,11 +192,12 @@ testChanged(
       expect(stuff).toBeGreaterThanOrEqual(42);
     });
     `
-)
+  )
+})
 
-testChanged(
-  'maps expect contain matchers',
-  `
+test('maps expect contain matchers', () => {
+  expectTransformation(
+    `
     import expect from 'expect';
 
     test(() => {
@@ -212,7 +214,7 @@ testChanged(
       expect({ a: 1, b: 2 }).toExcludeKeys([ 'c', 'd' ]);
     });
     `,
-  `
+    `
     test(() => {
       expect(stuff).toContain(1);
       expect(stuff).toContain(1);
@@ -231,11 +233,12 @@ testChanged(
       });
     });
     `
-)
+  )
+})
 
-testChanged(
-  'maps expect spy matchers',
-  `
+test('maps expect spy matchers', () => {
+  expectTransformation(
+    `
     import expect from 'expect';
 
     test(() => {
@@ -244,18 +247,19 @@ testChanged(
       expect(stuff).toHaveBeenCalledWith('foo', 'bar');
     });
     `,
-  `
+    `
     test(() => {
       expect(stuff).toHaveBeenCalled();
       expect(stuff).not.toHaveBeenCalled();
       expect(stuff).toHaveBeenCalledWith('foo', 'bar');
     });
     `
-)
+  )
+})
 
-testChanged(
-  'maps spy creation calls',
-  `
+test('maps spy creation calls', () => {
+  expectTransformation(
+    `
     import expect from 'expect';
 
     test(() => {
@@ -274,7 +278,7 @@ testChanged(
       not.a.spy.andCall(fn);
     });
     `,
-  `
+    `
     test(() => {
       var spy1 = jest.fn();
       var spy2 = jest.spyOn(video, 'play');
@@ -293,11 +297,12 @@ testChanged(
       not.a.spy.andCall(fn);
     });
     `
-)
+  )
+})
 
-testChanged(
-  'maps spy methods on intitialized spies',
-  `
+test('maps spy methods on intitialized spies', () => {
+  expectTransformation(
+    `
     import expect from 'expect';
 
     test(() => {
@@ -323,7 +328,7 @@ testChanged(
       spy2.reset();
     });
     `,
-  `
+    `
     test(() => {
       var spy1 = jest.fn();
       var spy2 = jest.spyOn(video, 'play');
@@ -349,11 +354,12 @@ testChanged(
       spy2.mockClear();
     });
     `
-)
+  )
+})
 
-testChanged(
-  'maps spy methods on intitialized spies (spread import)',
-  `
+test('maps spy methods on intitialized spies (spread import)', () => {
+  expectTransformation(
+    `
     import { createSpy, spyOn } from 'expect'
 
     test(() => {
@@ -365,7 +371,7 @@ testChanged(
       spy2.reset();
     });
     `,
-  `
+    `
     test(() => {
       var spy1 = jest.fn();
       var spy2 = jest.spyOn(video, 'play');
@@ -375,11 +381,12 @@ testChanged(
       spy2.mockClear();
     });
     `
-)
+  )
+})
 
-testChanged(
-  'maps spy array',
-  `
+test('maps spy array', () => {
+  expectTransformation(
+    `
     import { createSpy, spyOn } from 'expect'
 
     test(() => {
@@ -393,7 +400,7 @@ testChanged(
       expect(inputs[1].calls.length).toEqual(1)
     });
     `,
-  `
+    `
     test(() => {
       const inputs = [
         jest.fn(props => <input {...props.input} />),
@@ -405,11 +412,12 @@ testChanged(
       expect(inputs[1].mock.calls.length).toEqual(1)
     });
     `
-)
+  )
+})
 
-testChanged(
-  'renames non standard expect import name',
-  `
+test('renames non standard expect import name', () => {
+  expectTransformation(
+    `
     import exp from 'expect';
 
     test(() => {
@@ -418,18 +426,19 @@ testChanged(
       exp(stuff).toHaveBeenCalledWith(1);
     });
     `,
-  `
+    `
     test(() => {
       expect(stuff).toHaveBeenCalled();
       expect(stuff).not.toHaveBeenCalled();
       expect(stuff).toHaveBeenCalledWith(1);
     });
     `
-)
+  )
+})
 
-testChanged(
-  'support chaining',
-  `
+test('support chaining', () => {
+  expectTransformation(
+    `
     import expect from 'expect';
 
     test(() => {
@@ -440,7 +449,7 @@ testChanged(
          .toBeMoreThan(42);
     });
     `,
-  `
+    `
     test(() => {
       expect(stuff).toBeTruthy();
       expect(typeof stuff).toBe('number');
@@ -448,32 +457,34 @@ testChanged(
       expect(stuff).toBeGreaterThan(42);
     });
     `
-)
+  )
+})
 
-testChanged(
-  'standaloneMode: keeps expect import',
-  `
+test('standaloneMode: keeps expect import', () => {
+  expectTransformation(
+    `
     import exp from 'expect';
 
     test(() => {
       exp(stuff).toHaveBeenCalled();
     });
     `,
-  `
+    `
     import exp from 'expect';
 
     test(() => {
       exp(stuff).toHaveBeenCalled();
     });
     `,
-  {
-    standaloneMode: true,
-  }
-)
-
-testChanged(
-  'standaloneMode: rewrites expect.spyOn (import)',
-  `
+    {
+      standaloneMode: true,
+    }
+  )
+})
+
+test('standaloneMode: rewrites expect.spyOn (import)', () => {
+  expectTransformation(
+    `
     import expect from 'expect';
 
     test(() => {
@@ -485,7 +496,7 @@ testChanged(
         expect(spy1.calls.length).toEqual(3);
     });
     `,
-  `
+    `
     import mock from 'jest-mock';
     import expect from 'expect';
 
@@ -498,14 +509,15 @@ testChanged(
         expect(spy1.mock.calls.length).toEqual(3);
     });
     `,
-  {
-    standaloneMode: true,
-  }
-)
-
-testChanged(
-  'standaloneMode: rewrites expect.spyOn (require)',
-  `
+    {
+      standaloneMode: true,
+    }
+  )
+})
+
+test('standaloneMode: rewrites expect.spyOn (require)', () => {
+  expectTransformation(
+    `
     const expect = require('expect');
 
     test(() => {
@@ -514,7 +526,7 @@ testChanged(
         expect(spy1.calls.length).toEqual(3);
     });
     `,
-  `
+    `
     const mock = require('jest-mock');
     const expect = require('expect');
 
@@ -524,10 +536,11 @@ testChanged(
         expect(spy1.mock.calls.length).toEqual(3);
     });
     `,
-  {
-    standaloneMode: true,
-  }
-)
+    {
+      standaloneMode: true,
+    }
+  )
+})
 
 test('warns about unsupported spy features', () => {
   wrappedPlugin(`
diff --git a/src/transformers/jasmine-globals.test.ts b/src/transformers/jasmine-globals.test.ts
index 65904be..9ef7989 100644
--- a/src/transformers/jasmine-globals.test.ts
+++ b/src/transformers/jasmine-globals.test.ts
@@ -6,23 +6,16 @@ import plugin from './jasmine-globals'
 
 chalk.level = 0
 const wrappedPlugin = wrapPlugin(plugin)
-
-function testChanged(msg, source, expectedOutput) {
-  test(msg, () => {
-    const result = wrappedPlugin(source)
-    expect(result).toBe(expectedOutput)
-  })
-}
-
 let consoleWarnings = []
+
 beforeEach(() => {
   consoleWarnings = []
   console.warn = (v) => consoleWarnings.push(v)
 })
 
-testChanged(
-  'spyOn',
-  `
+test('spyOn', () => {
+  expectTransformation(
+    `
     jest.spyOn().mockReturnValue();
     spyOn(stuff).and.callThrough();
     spyOn(stuff).and.callFake(() => 'lol');
@@ -31,7 +24,7 @@ testChanged(
     spyOn(stuff);
     jest.spyOn().mockImplementation();
     `,
-  `
+    `
     jest.spyOn().mockReturnValue();
     jest.spyOn(stuff);
     jest.spyOn(stuff).mockImplementation(() => 'lol');
@@ -40,11 +33,12 @@ testChanged(
     jest.spyOn(stuff).mockImplementation(() => {});
     jest.spyOn().mockImplementation();
     `
-)
+  )
+})
 
-testChanged(
-  'jasmine.createSpy',
-  `
+test('jasmine.createSpy', () => {
+  expectTransformation(
+    `
     jasmine.createSpy();
     jasmine.createSpy('lmao');
     const spy = jasmine.createSpy();
@@ -52,7 +46,7 @@ testChanged(
     jasmine.createSpy().and.returnValue('lmao');
     const spy = jasmine.createSpy().and.returnValue('lmao');
     `,
-  `
+    `
     jest.fn();
     jest.fn();
     const spy = jest.fn();
@@ -60,7 +54,8 @@ testChanged(
     jest.fn(() => 'lmao');
     const spy = jest.fn(() => 'lmao');
     `
-)
+  )
+})
 
 test('not supported jasmine.createSpy().and.*', () => {
   wrappedPlugin(`
@@ -72,9 +67,9 @@ test('not supported jasmine.createSpy().and.*', () => {
   ])
 })
 
-testChanged(
-  '*.calls.count()',
-  `
+test('*.calls.count()', () => {
+  expectTransformation(
+    `
     someMock.calls.count();
     stuff.someMock.calls.count();
     getMock(stuff).calls.count();
@@ -87,7 +82,7 @@ testChanged(
     spyOn('stuff').andCallThrough();
     stuff.andCallThrough();
     `,
-  `
+    `
     someMock.mock.calls.length;
     stuff.someMock.mock.calls.length;
     getMock(stuff).mock.calls.length;
@@ -100,73 +95,79 @@ testChanged(
     jest.spyOn('stuff');
     stuff;
     `
-)
+  )
+})
 
-testChanged(
-  '*.mostRecentCall',
-  `
+test('*.mostRecentCall', () => {
+  expectTransformation(
+    `
     wyoming.cheyenne.stuff.mostRecentCall.args[0]
     georgia.atlanta.mostRecentCall.args.map(fn)
     `,
-  `
+    `
     wyoming.cheyenne.stuff.mock.calls[wyoming.cheyenne.stuff.mock.calls.length - 1][0]
     georgia.atlanta.mock.calls[georgia.atlanta.mock.calls.length - 1].map(fn)
     `
-)
+  )
+})
 
-testChanged(
-  '*.calls.mostRecent()',
-  `
+test('*.calls.mostRecent()', () => {
+  expectTransformation(
+    `
     const foo = someMock.calls.mostRecent();
     someMock.calls.mostRecent()[0];
 
     foo.mostRecent();
     `,
-  `
+    `
     const foo = someMock.mock.calls[someMock.mock.calls.length - 1];
     someMock.mock.calls[someMock.mock.calls.length - 1][0];
 
     foo.mostRecent();
     `
-)
+  )
+})
 
-testChanged(
-  '*.argsForCall',
-  `
+test('*.argsForCall', () => {
+  expectTransformation(
+    `
     oklahoma.argsForCall[0]
     idaho.argsForCall[0][1]
     `,
-  `
+    `
     oklahoma.mock.calls[0]
     idaho.mock.calls[0][1]
     `
-)
+  )
+})
 
-testChanged(
-  '*.calls.argsFor()',
-  `
+test('*.calls.argsFor()', () => {
+  expectTransformation(
+    `
     oklahoma.calls.argsFor(0)
     idaho.calls.argsFor(0)[1]
     `,
-  `
+    `
     oklahoma.mock.calls[0]
     idaho.mock.calls[0][1]
     `
-)
+  )
+})
 
-testChanged(
-  'jasmine.clock()',
-  `
+test('jasmine.clock()', () => {
+  expectTransformation(
+    `
     jasmine.clock().install();
     jasmine.clock().uninstall();
     jasmine.clock().tick(50);
     `,
-  `
+    `
     jest.useFakeTimers();
     jest.useRealTimers();
     jest.advanceTimersByTime(50);
     `
-)
+  )
+})
 
 test('not supported jasmine.clock()', () => {
   wrappedPlugin(`
@@ -180,49 +181,57 @@ test('not supported jasmine.clock()', () => {
   ])
 })
 
-testChanged(
-  'jasmine.<jasmineToExpectFunctionName>(*)',
-  `
+test('jasmine.<jasmineToExpectFunctionName>(*)', () => {
+  expectTransformation(
+    `
     jasmine.any(Function);
     jasmine.anything();
     jasmine.arrayContaining(['foo']);
     jasmine.objectContaining({ foo: 'bar' });
     jasmine.stringMatching('text');
     `,
-  `
+    `
     expect.any(Function);
     expect.anything();
     expect.arrayContaining(['foo']);
     expect.objectContaining({ foo: 'bar' });
     expect.stringMatching('text');
     `
-)
+  )
+})
 
-testChanged(
-  'createSpyObj',
-  `
+test('createSpyObj', () => {
+  expectTransformation(
+    `
     const spyObj = jasmine.createSpyObj('label', ['a', 'b', 'hyphen-ated']);
     `,
-  `
+    `
     const spyObj = {
         'a': jest.fn(),
         'b': jest.fn(),
         'hyphen-ated': jest.fn()
     };
     `
-)
+  )
+})
 
-testChanged(
-  'return value',
-  `
+test('return value', () => {
+  expectTransformation(
+    `
     focusMonitorMock = jasmine.createSpyObj('FocusMonitorMock', ['monitor', 'stopMonitoring']);
     focusMonitorMock.monitor.and.returnValue(of());
     `,
-  `
+    `
     focusMonitorMock = {
         'monitor': jest.fn(),
         'stopMonitoring': jest.fn()
     };
     focusMonitorMock.monitor.mockReturnValue(of());
     `
-)
+  )
+})
+
+function expectTransformation(source, expectedOutput) {
+  const result = wrappedPlugin(source)
+  expect(result).toBe(expectedOutput)
+}
diff --git a/src/transformers/jasmine-this.test.ts b/src/transformers/jasmine-this.test.ts
index f7f6a7a..5034567 100644
--- a/src/transformers/jasmine-this.test.ts
+++ b/src/transformers/jasmine-this.test.ts
@@ -7,16 +7,14 @@ import plugin from './jasmine-this'
 chalk.level = 0
 const wrappedPlugin = wrapPlugin(plugin)
 
-function testChanged(msg, source, expectedOutput, options = {}) {
-  test(msg, () => {
-    const result = wrappedPlugin(source, options)
-    expect(result).toBe(expectedOutput)
-  })
+function expectTransformation(source, expectedOutput, options = {}) {
+  const result = wrappedPlugin(source, options)
+  expect(result).toBe(expectedOutput)
 }
 
-testChanged(
-  'transforms simple cases',
-  `
+test('transforms simple cases', () => {
+  expectTransformation(
+    `
 describe('foo', function() {
     beforeEach(function() {
         this.foo = { id: 'FOO' };
@@ -30,7 +28,7 @@ describe('foo', function() {
     });
 });
 `,
-  `
+    `
 describe('foo', () => {
     let testContext;
 
@@ -50,11 +48,12 @@ describe('foo', () => {
     });
 });
 `
-)
+  )
+})
 
-testChanged(
-  'does not transform generator functions',
-  `
+test('does not transform generator functions', () => {
+  expectTransformation(
+    `
 describe('foo', function*() {
     beforeEach(function*() {
         this.foo = { id: 'FOO' };
@@ -68,7 +67,7 @@ describe('foo', function*() {
     });
 });
 `,
-  `
+    `
 describe('foo', function*() {
     let testContext;
 
@@ -88,11 +87,12 @@ describe('foo', function*() {
     });
 });
 `
-)
+  )
+})
 
-testChanged(
-  'transforms only test functions context',
-  `
+test('transforms only test functions context', () => {
+  expectTransformation(
+    `
 describe('foo', function() {
     const MockClass = function(options) {
         this.options = options;
@@ -129,7 +129,7 @@ describe('bar', function () {
   });
 });
 `,
-  `
+    `
 describe('foo', () => {
     let testContext;
 
@@ -172,11 +172,12 @@ describe('bar', () => {
   });
 });
 `
-)
+  )
+})
 
-testChanged(
-  'transforms nested describes',
-  `
+test('transforms nested describes', () => {
+  expectTransformation(
+    `
 describe('foo', function() {
     beforeEach(function() {
         this.foo = { id: 'FOO' };
@@ -198,7 +199,7 @@ describe('foo', function() {
     });
 });
 `,
-  `
+    `
 describe('foo', () => {
     let testContext;
 
@@ -226,11 +227,12 @@ describe('foo', () => {
     });
 });
 `
-)
+  )
+})
 
-testChanged(
-  'transforms plain functions within lifecycle methods',
-  `
+test('transforms plain functions within lifecycle methods', () => {
+  expectTransformation(
+    `
 describe('foo', function() {
     beforeEach(function() {
         this.foo = { id: 'FOO' };
@@ -261,7 +263,7 @@ describe('foo', function() {
     });
 });
 `,
-  `
+    `
 describe('foo', () => {
     let testContext;
 
@@ -298,11 +300,12 @@ describe('foo', () => {
     });
 });
 `
-)
+  )
+})
 
-testChanged(
-  'transforms context within arrow functions',
-  `
+test('transforms context within arrow functions', () => {
+  expectTransformation(
+    `
 describe('foo', () => {
     beforeEach(function() {
         this.foo = { id: 'FOO' };
@@ -313,7 +316,7 @@ describe('foo', () => {
     });
 });
 `,
-  `
+    `
 describe('foo', () => {
     let testContext;
 
@@ -330,11 +333,12 @@ describe('foo', () => {
     });
 });
 `
-)
+  )
+})
 
-testChanged(
-  'transforms context within async functions',
-  `
+test('transforms context within async functions', () => {
+  expectTransformation(
+    `
 describe('foo', function () {
     beforeEach(async function() {
         this.foo = await globalPromise();
@@ -346,7 +350,7 @@ describe('foo', function () {
     });
 });
 `,
-  `
+    `
 describe('foo', () => {
     let testContext;
 
@@ -364,11 +368,12 @@ describe('foo', () => {
     });
 });
 `
-)
+  )
+})
 
-testChanged(
-  'original issue example',
-  `
+test('original issue example', () => {
+  expectTransformation(
+    `
 beforeEach(function () {
     this.hello = 'hi';
 });
@@ -383,7 +388,7 @@ describe('context', () => {
     });
 });
 `,
-  `
+    `
 let testContext;
 
 beforeEach(() => {
@@ -404,11 +409,12 @@ describe('context', () => {
     });
 });
 `
-)
+  )
+})
 
-testChanged(
-  'transforms before blocks',
-  `
+test('transforms before blocks', () => {
+  expectTransformation(
+    `
   beforeAll(function () {
     this.hello = 'hi';
   });
@@ -429,7 +435,7 @@ testChanged(
       });
   });
 `,
-  `
+    `
   let testContext;
 
   beforeAll(() => {
@@ -456,11 +462,12 @@ testChanged(
       });
   });
 `
-)
+  )
+})
 
-testChanged(
-  'does not transform mocha specific methods',
-  `
+test('does not transform mocha specific methods', () => {
+  expectTransformation(
+    `
 describe('foo', function () {
     it('should keep mocha methods', function() {
         this.timeout(500);
@@ -470,7 +477,7 @@ describe('foo', function () {
     });
 });
 `,
-  `
+    `
 describe('foo', () => {
     it('should keep mocha methods', () => {
         this.timeout(500);
@@ -480,11 +487,12 @@ describe('foo', () => {
     });
 });
 `
-)
+  )
+})
 
-testChanged(
-  'ignores a function in an array',
-  `
+test('ignores a function in an array', () => {
+  expectTransformation(
+    `
 describe('foo', function() {
     it('should tolerate an array of functions', function() {
         foo.apply(model, [
@@ -495,7 +503,7 @@ describe('foo', function() {
     });
 });
 `,
-  `
+    `
 describe('foo', () => {
     it('should tolerate an array of functions', () => {
         foo.apply(model, [
@@ -506,11 +514,12 @@ describe('foo', () => {
     });
 });
 `
-)
+  )
+})
 
-testChanged(
-  'adds any type to the test context with typescript (tsx)',
-  `
+test('adds any type to the test context with typescript (tsx)', () => {
+  expectTransformation(
+    `
   beforeEach(function () {
       this.hello = 'hi';
   });
@@ -525,7 +534,7 @@ testChanged(
       });
   });
   `,
-  `
+    `
   let testContext: any;
 
   beforeEach(() => {
@@ -546,12 +555,13 @@ testChanged(
       });
   });
   `,
-  { parser: 'tsx' }
-)
+    { parser: 'tsx' }
+  )
+})
 
-testChanged(
-  'adds any type to the test context with typescript (ts)',
-  `
+test('adds any type to the test context with typescript (ts)', () => {
+  expectTransformation(
+    `
 beforeEach(function () {
     this.hello = 'hi';
 });
@@ -566,7 +576,7 @@ describe('context', () => {
     });
 });
 `,
-  `
+    `
 let testContext: any;
 
 beforeEach(() => {
@@ -587,5 +597,6 @@ describe('context', () => {
     });
 });
 `,
-  { parser: 'ts' }
-)
+    { parser: 'ts' }
+  )
+})
diff --git a/src/transformers/mocha.test.ts b/src/transformers/mocha.test.ts
index 257f2a9..2b0f1de 100644
--- a/src/transformers/mocha.test.ts
+++ b/src/transformers/mocha.test.ts
@@ -10,17 +10,15 @@ beforeEach(() => {
   console.warn = (v) => consoleWarnings.push(v)
 })
 
-function testChanged(msg, source, expectedOutput, options = {}) {
-  test(msg, () => {
-    const result = wrappedPlugin(source, options)
-    expect(result).toBe(expectedOutput)
-    expect(consoleWarnings).toEqual([])
-  })
+function expectTransformation(source, expectedOutput, options = {}) {
+  const result = wrappedPlugin(source, options)
+  expect(result).toBe(expectedOutput)
+  expect(consoleWarnings).toEqual([])
 }
 
-testChanged(
-  'maps BDD-style interface',
-  `
+test('maps BDD-style interface', () => {
+  expectTransformation(
+    `
 // @flow
 describe('describe', () => {
   before(() => {});
@@ -40,7 +38,7 @@ describe('describe', () => {
   })
 })
 `,
-  `
+    `
 // @flow
 describe('describe', () => {
   beforeAll(() => {});
@@ -60,11 +58,12 @@ describe('describe', () => {
   })
 })
 `
-)
+  )
+})
 
-testChanged(
-  'maps TDD-style interface',
-  `
+test('maps TDD-style interface', () => {
+  expectTransformation(
+    `
 // @flow
 suite('suite', () => {
   suiteSetup(() => {});
@@ -82,7 +81,7 @@ suite('suite', () => {
   it('description', () => {});
 })
 `,
-  `
+    `
 // @flow
 describe('suite', () => {
   beforeAll(() => {});
@@ -100,29 +99,31 @@ describe('suite', () => {
   it('description', () => {});
 })
 `
-)
+  )
+})
 
-testChanged(
-  'preserves exclusive tests',
-  `
+test('preserves exclusive tests', () => {
+  expectTransformation(
+    `
 // @flow
 suite.only('only suite', () => {
   test.only('only test', () => {});
   it.only('only test', () => {});
 });
 `,
-  `
+    `
 // @flow
 describe.only('only suite', () => {
   test.only('only test', () => {});
   it.only('only test', () => {});
 });
 `
-)
+  )
+})
 
-testChanged(
-  'preserves skipped tests',
-  `
+test('preserves skipped tests', () => {
+  expectTransformation(
+    `
 // @flow
 suite.skip('skip suite', () => {
   test.skip('skip test', () => {});
@@ -131,7 +132,7 @@ suite.skip('skip suite', () => {
   it('test will be skipped');
 });
 `,
-  `
+    `
 // @flow
 describe.skip('skip suite', () => {
   test.skip('skip test', () => {});
@@ -140,11 +141,12 @@ describe.skip('skip suite', () => {
   it.skip('test will be skipped', () => {});
 });
 `
-)
+  )
+})
 
-testChanged(
-  'preserves call expressions that are defined in scope',
-  `
+test('preserves call expressions that are defined in scope', () => {
+  expectTransformation(
+    `
 const setup = () => {};
 context('test suite', () => {
     test('test', () => {
@@ -155,7 +157,7 @@ context('test suite', () => {
     });
 });
 `,
-  `
+    `
 const setup = () => {};
 describe('test suite', () => {
     test('test', () => {
@@ -166,24 +168,26 @@ describe('test suite', () => {
     });
 });
 `
-)
+  )
+})
 
-testChanged(
-  'removes mocha import',
-  `
+test('removes mocha import', () => {
+  expectTransformation(
+    `
 import { describe, it } from 'mocha';
 suite('suite', () => {
 })
     `,
-  `
+    `
 describe('suite', () => {
 })
     `
-)
+  )
+})
 
-testChanged(
-  'adds any type to the test context with typescript (tsx)',
-  `
+test('adds any type to the test context with typescript (tsx)', () => {
+  expectTransformation(
+    `
 describe('describe', function () {
   beforeEach(function () {
     this.hello = 'hi';
@@ -199,7 +203,7 @@ describe('describe', function () {
   })
 })
 `,
-  `
+    `
 describe('describe', () => {
   let testContext: any;
 
@@ -221,12 +225,13 @@ describe('describe', () => {
   })
 })
 `,
-  { parser: 'tsx' }
-)
+    { parser: 'tsx' }
+  )
+})
 
-testChanged(
-  'adds any type to the test context with typescript (ts)',
-  `
+test('adds any type to the test context with typescript (ts)', () => {
+  expectTransformation(
+    `
 describe('describe', function () {
   beforeEach(function () {
     this.hello = 'hi';
@@ -242,7 +247,7 @@ describe('describe', function () {
   })
 })
 `,
-  `
+    `
 describe('describe', () => {
   let testContext: any;
 
@@ -264,12 +269,13 @@ describe('describe', () => {
   })
 })
 `,
-  { parser: 'ts' }
-)
+    { parser: 'ts' }
+  )
+})
 
-testChanged(
-  'transforms this',
-  `
+test('transforms this', () => {
+  expectTransformation(
+    `
 // @flow
 describe('describe', function () {
   before(function() {
@@ -306,7 +312,7 @@ describe('describe', function () {
   })
 })
 `,
-  `
+    `
 // @flow
 describe('describe', () => {
   let testContext;
@@ -349,4 +355,5 @@ describe('describe', () => {
   })
 })
 `
-)
+  )
+})
diff --git a/src/transformers/should.test.ts b/src/transformers/should.test.ts
index f24f67d..7f48aa1 100644
--- a/src/transformers/should.test.ts
+++ b/src/transformers/should.test.ts
@@ -13,17 +13,15 @@ beforeEach(() => {
   console.warn = (v) => consoleWarnings.push(v)
 })
 
-function testChanged(msg, source, expectedOutput) {
-  test(msg, () => {
-    const result = wrappedPlugin(source)
-    expect(result).toBe(expectedOutput)
-    expect(consoleWarnings).toEqual([])
-  })
+function expectTransformation(source, expectedOutput) {
+  const result = wrappedPlugin(source)
+  expect(result).toBe(expectedOutput)
+  expect(consoleWarnings).toEqual([])
 }
 
-testChanged(
-  'removes imports and does basic conversions of should.js',
-  `
+test('removes imports and does basic conversions of should.js', () => {
+  expectTransformation(
+    `
         var should = require('should');
 
         var user = {
@@ -37,7 +35,7 @@ testChanged(
         should.throws(foo, /^Description/);
         should(foo).be.undefined();
     `,
-  `
+    `
         var user = {
             name: 'tj'
           , pets: ['tobi', 'loki', 'jane', 'bandit']
@@ -49,15 +47,17 @@ testChanged(
         expect(foo).toThrowError(/^Description/);
         expect(foo).toBeUndefined();
     `
-)
+  )
+})
 
-testChanged(
-  'leaves code without should/expect',
-  `
+test('leaves code without should/expect', () => {
+  expectTransformation(
+    `
         function test() {
             i.have.a.dream();
             i.have.a.dream;
         }
         `,
-  null
-)
+    null
+  )
+})
diff --git a/src/transformers/tape.test.ts b/src/transformers/tape.test.ts
index 9836da0..1e483f0 100644
--- a/src/transformers/tape.test.ts
+++ b/src/transformers/tape.test.ts
@@ -14,66 +14,68 @@ beforeEach(() => {
   console.warn = (v) => consoleWarnings.push(v)
 })
 
-function testChanged(msg, source, expectedOutput, options = {}) {
-  test(msg, () => {
-    const result = wrappedPlugin(source, options)
-    expect(result).toBe(expectedOutput)
-    expect(consoleWarnings).toEqual([])
-  })
+function expectTransformation(source, expectedOutput, options = {}) {
+  const result = wrappedPlugin(source, options)
+  expect(result).toBe(expectedOutput)
+  expect(consoleWarnings).toEqual([])
 }
 
-testChanged(
-  'does not touch code without tape require/import',
-  `
+test('does not touch code without tape require/import', () => {
+  expectTransformation(
+    `
 const test = require("testlib");
 test(t => {
     t.notOk(1);
 });`,
-  `
+    `
 const test = require("testlib");
 test(t => {
     t.notOk(1);
 });`
-)
+  )
+})
 
-testChanged(
-  'changes code without tape require/import if skipImportDetection is set',
-  `
+test('changes code without tape require/import if skipImportDetection is set', () => {
+  expectTransformation(
+    `
 test(t => {
     t.notOk(1);
 });`,
-  `
+    `
 test(t => {
     expect(1).toBeFalsy();
 });`,
-  { skipImportDetection: true }
-)
+    { skipImportDetection: true }
+  )
+})
 
-testChanged(
-  'CommonJs requires',
-  `
+test('CommonJs requires', () => {
+  expectTransformation(
+    `
 const test = require('tape');
 const x = 1;
 `,
-  `
+    `
 const x = 1;
 `
-)
+  )
+})
 
-testChanged(
-  'ES2015 imports',
-  `
+test('ES2015 imports', () => {
+  expectTransformation(
+    `
 import test from 'tape';
 const x = 1;
 `,
-  `
+    `
 const x = 1;
 `
-)
+  )
+})
 
-testChanged(
-  'maps assertions and comments',
-  `
+test('maps assertions and comments', () => {
+  expectTransformation(
+    `
 import test from 'tape';
 test((t) => {
     t.fail('msg');
@@ -129,7 +131,7 @@ test((t) => {
     t.comment('this is a comment...');
 });
 `,
-  `
+    `
 test(done => {
     done.fail('msg');
     expect(1).toBeTruthy();
@@ -183,11 +185,12 @@ test(done => {
     console.log('this is a comment...');
 });
 `
-)
+  )
+})
 
-testChanged(
-  'rewriting non standard naming of test function and t argument',
-  `
+test('rewriting non standard naming of test function and t argument', () => {
+  expectTransformation(
+    `
 import myTapeTest from "tape";
 myTapeTest("mytest", t => {
     t.ok("msg");
@@ -205,7 +208,7 @@ myTapeTest(function(t) {
     t.ok("msg");
 });
 `,
-  `
+    `
 test("mytest", () => {
     expect("msg").toBeTruthy();
 });
@@ -222,57 +225,61 @@ test(function() {
     expect("msg").toBeTruthy();
 });
 `
-)
+  )
+})
 
-testChanged(
-  'test options: removes',
-  `
+test('test options: removes', () => {
+  expectTransformation(
+    `
 import test from 'tape';
 test('mytest', {objectPrintDepth: 4, skip: false}, t => {
     t.ok('msg');
 });
 `,
-  `
+    `
 test('mytest', () => {
     expect('msg').toBeTruthy();
 });
 `
-)
+  )
+})
 
-testChanged(
-  'test options: skip',
-  `
+test('test options: skip', () => {
+  expectTransformation(
+    `
 import test from 'tape';
 test('mytest', {objectPrintDepth: 4, skip: true}, t => {
     t.ok('msg');
 });
 `,
-  `
+    `
 test.skip('mytest', () => {
     expect('msg').toBeTruthy();
 });
 `
-)
+  )
+})
 
-testChanged(
-  'removes t.end in scope of test function',
-  `
+test('removes t.end in scope of test function', () => {
+  expectTransformation(
+    `
 import test from 'tape';
 test('mytest', t => {
     t.equal(1, 1);
     t.end();
 });
 `,
-  `
+    `
 test('mytest', () => {
     expect(1).toBe(1);
 });
 `
-)
+  )
+})
 
-testChanged(
-  'keeps t.end in nested functions',
-  `
+test('keeps t.end in nested functions', () => {
+  expectTransformation(
+    `
 import test from 'tape';
 
 test(t => {
@@ -281,18 +288,19 @@ test(t => {
     }, 500);
 });
 `,
-  `
+    `
 test(done => {
     setTimeout(() => {
         done();
     }, 500);
 });
 `
-)
+  )
+})
 
-testChanged(
-  'removes t.pass but keeps t.fail',
-  `
+test('removes t.pass but keeps t.fail', () => {
+  expectTransformation(
+    `
 import test from 'tape'
 
 test(function(t) {
@@ -306,7 +314,7 @@ test('handles done.fail and done.pass', t => {
     }, 500);
 });
 `,
-  `
+    `
 test(function(done) {
     done.fail();
 });
@@ -317,11 +325,12 @@ test('handles done.fail and done.pass', done => {
     }, 500);
 });
 `
-)
+  )
+})
 
-testChanged(
-  't.throws',
-  `
+test('t.throws', () => {
+  expectTransformation(
+    `
 import test from 'tape';
 test(t => {
     t.throws(myfunc, 'should not throw');
@@ -330,7 +339,7 @@ test(t => {
     t.throws(myfunc, /err_reg_exp/i, 'should not throw');
 });
 `,
-  `
+    `
 test(() => {
     expect(myfunc).toThrow();
     expect(myfunc).toThrowError('xxx');
@@ -338,11 +347,12 @@ test(() => {
     expect(myfunc).toThrowError(/err_reg_exp/i);
 });
 `
-)
+  )
+})
 
-testChanged(
-  'destructured test argument',
-  `
+test('destructured test argument', () => {
+  expectTransformation(
+    `
 import test from 'tape';
 test(({ok}) => {
     ok('msg');
@@ -351,7 +361,7 @@ test('my test', ({equal}) => {
     equal('msg', 'other msg');
 });
 `,
-  `
+    `
 test(() => {
     expect('msg').toBeTruthy();
 });
@@ -359,11 +369,12 @@ test('my test', () => {
     expect('msg').toBe('other msg');
 });
 `
-)
+  )
+})
 
-testChanged(
-  `supports the todo option`,
-  `
+test(`supports the todo option`, () => {
+  expectTransformation(
+    `
 import test from 'tape';
 test({todo: true}, t => {
     t.equal(1, 1);
@@ -372,7 +383,7 @@ test({todo: false}, t => {
     t.equal(1, 1);
 });
 `,
-  `
+    `
 test.todo(() => {
     expect(1).toBe(1);
 });
@@ -380,7 +391,8 @@ test(() => {
     expect(1).toBe(1);
 });
 `
-)
+  )
+})
 
 test('not supported warnings: createStream', () => {
   wrappedPlugin(`
@@ -495,28 +507,30 @@ test('graciously warns about unknown destructured assertions', () => {
     `)
 })
 
-testChanged(
-  'supports renaming non standard import name',
-  `
+test('supports renaming non standard import name', () => {
+  expectTransformation(
+    `
 import foo from 'tape';
 foo(() => {});
 `,
-  `
+    `
 test(() => {});
 `
-)
+  )
+})
 
-testChanged(
-  'doesNotThrow works with `expected` argument',
-  `
+test('doesNotThrow works with `expected` argument', () => {
+  expectTransformation(
+    `
 import test from 'tape';
 test('foo', t => {
     t.doesNotThrow(() => {}, TypeError, 'foo');
 });
 `,
-  `
+    `
 test('foo', () => {
     expect(() => {}).not.toThrowError(TypeError);
 });
 `
-)
+  )
+})