Browse Source

test for #1233

gh-1187
Rich Harris 8 years ago
parent
commit
585bde0f36
  1. 3
      test/form/class-constructor-side-effect/_config.js
  2. 11
      test/form/class-constructor-side-effect/_expected/amd.js
  3. 9
      test/form/class-constructor-side-effect/_expected/cjs.js
  4. 7
      test/form/class-constructor-side-effect/_expected/es.js
  5. 12
      test/form/class-constructor-side-effect/_expected/iife.js
  6. 15
      test/form/class-constructor-side-effect/_expected/umd.js
  7. 7
      test/form/class-constructor-side-effect/main.js

3
test/form/class-constructor-side-effect/_config.js

@ -0,0 +1,3 @@
module.exports = {
description: 'preserves side-effects in a class constructor (#1233)'
};

11
test/form/class-constructor-side-effect/_expected/amd.js

@ -0,0 +1,11 @@
define(function () { 'use strict';
class Foo {
constructor () {
console.log( 'Foo' );
}
}
new Foo;
});

9
test/form/class-constructor-side-effect/_expected/cjs.js

@ -0,0 +1,9 @@
'use strict';
class Foo {
constructor () {
console.log( 'Foo' );
}
}
new Foo;

7
test/form/class-constructor-side-effect/_expected/es.js

@ -0,0 +1,7 @@
class Foo {
constructor () {
console.log( 'Foo' );
}
}
new Foo;

12
test/form/class-constructor-side-effect/_expected/iife.js

@ -0,0 +1,12 @@
(function () {
'use strict';
class Foo {
constructor () {
console.log( 'Foo' );
}
}
new Foo;
}());

15
test/form/class-constructor-side-effect/_expected/umd.js

@ -0,0 +1,15 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
class Foo {
constructor () {
console.log( 'Foo' );
}
}
new Foo;
})));

7
test/form/class-constructor-side-effect/main.js

@ -0,0 +1,7 @@
class Foo {
constructor () {
console.log( 'Foo' );
}
}
new Foo;
Loading…
Cancel
Save