const test = require('ava')
const { tmpdir } = require('os')
const { join } = require('path')
const rollup = require('rollup')
const config = require('../rollup.config')

test.skip('build: creates a valid bundle', async assert => {
  const bundle = await rollup.rollup(config)
  const file = join(tmpdir(), 'bundle.js')
  await bundle.write({
    ...config.output.find(object => object.file === 'dist/index.min.js'),
    file
  })
  const AbstractSyntaxTree = require(file)
  const tree = new AbstractSyntaxTree('const foo = 42')
  const literal = tree.find('Literal')
  assert.truthy(literal)
})

const test = require('ava')
const { tmpdir } = require('os')
const { join } = require('path')
const rollup = require('rollup')
const config = require('../rollup.config')

test('build: creates a valid bundle', async assert => {
  const bundle = await rollup.rollup(config)
  const file = join(tmpdir(), 'bundle.js')
  await bundle.write({
    ...config.output.find(object => object.file === 'dist/index.min.js'),
    file
  })
  const AbstractSyntaxTree = require(file)
  const tree = new AbstractSyntaxTree('const foo = 42')
  assert.truthy(tree)
})

--- 
+++ 
@@ -4,7 +4,7 @@
 const rollup = require('rollup')
 const config = require('../rollup.config')
 
-test.skip('build: creates a valid bundle', async assert => {
+test('build: creates a valid bundle', async assert => {
   const bundle = await rollup.rollup(config)
   const file = join(tmpdir(), 'bundle.js')
   await bundle.write({
@@ -13,6 +13,5 @@
   })
   const AbstractSyntaxTree = require(file)
   const tree = new AbstractSyntaxTree('const foo = 42')
-  const literal = tree.find('Literal')
-  assert.truthy(literal)
+  assert.truthy(tree)
 })
Add a failing test case
