From 9f3595fed856dfc6a740294af5d6c3d319d48c7c Mon Sep 17 00:00:00 2001 From: Sachin Kumar Date: Sun, 28 Jul 2024 20:45:47 +0530 Subject: [PATCH] chore: update snapshots --- test/__snapshots__/loader.test.js.snap | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/test/__snapshots__/loader.test.js.snap b/test/__snapshots__/loader.test.js.snap index 5c4effd..c887ddc 100644 --- a/test/__snapshots__/loader.test.js.snap +++ b/test/__snapshots__/loader.test.js.snap @@ -381,6 +381,8 @@ exports[`loader should work with object value with "default" syntax: warnings 1` exports[`loader should work with object value: errors 1`] = `[]`; +exports[`loader should work with object value: errors 2`] = `[]`; + exports[`loader should work with object value: module 1`] = ` "var Foo = Foo || {}; var Bar = Bar || {}; @@ -416,6 +418,41 @@ export { " `; +exports[`loader should work with object value: module 2`] = ` +"var Foo = Foo || {}; +var Bar = Bar || {}; +var Baz = { + nestedNumber: '12', + nestedFunction: function test() {} +}; +var simple = function simple() {}; +var simple_foo = [1, 2, 3, 4, 5]; + +Foo.Image = function(width, height, data){ + this.width = width || 0; + this.height = height || 0; + this.data = data || []; +}; + +Bar.test = [1, 2, 3, 4]; + +class MyClass { + myFunction() { + return 12; + } +} + +const single = 'single'; + +const myVariable = new MyClass(); + +/*** EXPORTS FROM exports-loader ***/ +export { + Foo +}; +" +`; + exports[`loader should work with object value: result 1`] = ` { "Foo": { @@ -424,8 +461,18 @@ exports[`loader should work with object value: result 1`] = ` } `; +exports[`loader should work with object value: result 2`] = ` +{ + "Foo": { + "Image": [Function], + }, +} +`; + exports[`loader should work with object value: warnings 1`] = `[]`; +exports[`loader should work with object value: warnings 2`] = `[]`; + exports[`loader should work with source maps when the "devtool" option is enabled: errors 1`] = `[]`; exports[`loader should work with source maps when the "devtool" option is enabled: module 1`] = `