diff options
Diffstat (limited to 'spec/inputs/test/export_import_interactions_spec.yue')
| -rw-r--r-- | spec/inputs/test/export_import_interactions_spec.yue | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/inputs/test/export_import_interactions_spec.yue b/spec/inputs/test/export_import_interactions_spec.yue new file mode 100644 index 0000000..8281246 --- /dev/null +++ b/spec/inputs/test/export_import_interactions_spec.yue | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | describe "export import interactions", -> | ||
| 2 | it "should import with alias and destructuring", -> | ||
| 3 | source = { | ||
| 4 | origin: {x: 10, y: 20} | ||
| 5 | target: "result" | ||
| 6 | point: {x: 5, y: 15} | ||
| 7 | } | ||
| 8 | import x, y from source.origin | ||
| 9 | import target from source | ||
| 10 | px, py = do | ||
| 11 | local x, y | ||
| 12 | import x, y from source.point | ||
| 13 | x, y | ||
| 14 | |||
| 15 | assert.same x, 10 | ||
| 16 | assert.same y, 20 | ||
| 17 | assert.same target, "result" | ||
| 18 | assert.same px, 5 | ||
| 19 | assert.same py, 15 | ||
