1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
# Snapshot report for `test/test.js`
The actual snapshot is saved in `test.js.snap`.
Generated by [AVA](https://ava.li).
## generates * imports
> Snapshot 1
`import * as foo from 'foo';␊
␊
console.log(foo.bar);␊
console.log(foo.baz);␊
`
## handles redundant keys
> Snapshot 1
`import { default as $inject_Buffer_isBuffer } from 'is-buffer';␊
␊
$inject_Buffer_isBuffer('foo');␊
`
## handles shadowed variables
> Snapshot 1
`function launch($) {␊
$(() => {␊
console.log('ready');␊
});␊
}␊
␊
launch((fn) => fn());␊
`
## handles shorthand properties
> Snapshot 1
`import { Promise as Promise } from 'es6-promise';␊
␊
const polyfills = { Promise };␊
polyfills.Promise.resolve().then(() => 'it works');␊
`
## ignores existing imports
> Snapshot 1
`import $ from 'jquery';␊
␊
$(() => {␊
console.log('ready');␊
});␊
`
## inserts a default import statement
> Snapshot 1
`import { default as $ } from 'jquery';␊
␊
$(() => {␊
console.log('ready');␊
});␊
`
## inserts a named import statement
> Snapshot 1
`import { Promise as Promise } from 'es6-promise';␊
␊
Promise.all([thisThing, thatThing]).then(() => someOtherThing);␊
`
## overwrites keypaths
> Snapshot 1
`import { default as $inject_Object_assign } from 'fixtures/keypaths/polyfills/object-assign.js';␊
␊
const original = { foo: 'bar' };␊
const clone = $inject_Object_assign({}, original);␊
␊
export default clone;␊
`
## transpiles non-JS files but handles failures to parse
> Snapshot 1
`import './styles.css';␊
import foo from './foo.es6';␊
␊
assert.equal(foo, path.join('..', 'baz'));␊
`
## uses the modules property
> Snapshot 1
`import { default as $ } from 'jquery';␊
␊
$(() => {␊
console.log('ready');␊
});␊
`
|