Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
088c877
commit 63ed4fa
Showing
9 changed files
with
79 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
test/form/samples/new-target-meta-property/_expected/amd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
define((function () { 'use strict'; | ||
|
||
class Foo { | ||
constructor() { | ||
console.log(new.target.name); | ||
} | ||
} | ||
|
||
new Foo(); | ||
|
||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
class Foo { | ||
constructor() { | ||
console.log(new.target.name); | ||
} | ||
} | ||
|
||
new Foo(); |
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
test/form/samples/new-target-meta-property/_expected/iife.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
class Foo { | ||
constructor() { | ||
console.log(new.target.name); | ||
} | ||
} | ||
|
||
new Foo(); | ||
|
||
})(); |
16 changes: 16 additions & 0 deletions
16
test/form/samples/new-target-meta-property/_expected/system.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
System.register([], (function () { | ||
'use strict'; | ||
return { | ||
execute: (function () { | ||
|
||
class Foo { | ||
constructor() { | ||
console.log(new.target.name); | ||
} | ||
} | ||
|
||
new Foo(); | ||
|
||
}) | ||
}; | ||
})); |
14 changes: 14 additions & 0 deletions
14
test/form/samples/new-target-meta-property/_expected/umd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(function (factory) { | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
factory(); | ||
})((function () { 'use strict'; | ||
|
||
class Foo { | ||
constructor() { | ||
console.log(new.target.name); | ||
} | ||
} | ||
|
||
new Foo(); | ||
|
||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
description: 'does not change new.target usages' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function Foo() { | ||
assert.strictEqual(new.target, Foo); | ||
} | ||
|
||
new Foo(); |