diff --git a/test/function/tracks-alias-mutations/_config.js b/test/function/tracks-alias-mutations/_config.js new file mode 100644 index 0000000..e43b7c1 --- /dev/null +++ b/test/function/tracks-alias-mutations/_config.js @@ -0,0 +1,4 @@ +module.exports = { + description: 'tracks mutations of aliased objects', + solo: true +}; diff --git a/test/function/tracks-alias-mutations/bar.js b/test/function/tracks-alias-mutations/bar.js new file mode 100644 index 0000000..4ec5140 --- /dev/null +++ b/test/function/tracks-alias-mutations/bar.js @@ -0,0 +1,6 @@ +import { foo } from './foo'; + +var f = foo; +f.wasMutated = true; + +export var bar = 'whatever'; diff --git a/test/function/tracks-alias-mutations/foo.js b/test/function/tracks-alias-mutations/foo.js new file mode 100644 index 0000000..386f265 --- /dev/null +++ b/test/function/tracks-alias-mutations/foo.js @@ -0,0 +1 @@ +export var foo = {}; diff --git a/test/function/tracks-alias-mutations/main.js b/test/function/tracks-alias-mutations/main.js new file mode 100644 index 0000000..7cf7ee2 --- /dev/null +++ b/test/function/tracks-alias-mutations/main.js @@ -0,0 +1,4 @@ +import { foo } from './foo'; +import { bar } from './bar'; + +assert.ok( foo.wasMutated );