Skip to content

Commit a5a73f1

Browse files
committed
test: add non-shorthand object literal cases
1 parent 1593697 commit a5a73f1

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

rs-lib/tests/integration_test.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ async fn transform_shims() {
8686
"\nconst obj = { Deno: dntShim.Deno, setTimeout: dntShim.setTimeout };"
8787
),
8888
),
89+
(
90+
// only a shorthand property gets the property name
91+
"const obj = { Deno: Deno, [Deno]: 1, ...Deno };",
92+
concat!(
93+
r#"import * as dntShim from "./_dnt.shims.js";"#,
94+
"
95+
const obj = { Deno: dntShim.Deno, [dntShim.Deno]: 1, ...dntShim.Deno };"
96+
),
97+
),
8998
(
9099
"const obj = { globalThis };",
91100
concat!(

0 commit comments

Comments
 (0)