From 9fd191f25a47d606b6f5444102bd5abbd26372b7 Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Sat, 22 Aug 2015 15:46:53 -0400 Subject: [PATCH] failing test for #96 --- test/function/tracks-alias-mutations/_config.js | 4 ++++ test/function/tracks-alias-mutations/bar.js | 6 ++++++ test/function/tracks-alias-mutations/foo.js | 1 + test/function/tracks-alias-mutations/main.js | 4 ++++ 4 files changed, 15 insertions(+) create mode 100644 test/function/tracks-alias-mutations/_config.js create mode 100644 test/function/tracks-alias-mutations/bar.js create mode 100644 test/function/tracks-alias-mutations/foo.js create mode 100644 test/function/tracks-alias-mutations/main.js 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 );