Skip to content

Commit b9f68af

Browse files
committed
fix: test snapshots
1 parent 1a82484 commit b9f68af

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app-config-esbuild/src/__snapshots__/index.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ exports[`loads config correctly 1`] = `
66
`;
77

88
exports[`loads currentEnvironment 1`] = `
9-
"(()=>{var t={foo:\\"bar\\"},e=(typeof window==\\"undefined\\"?globalThis:window)||{},r=e._appConfig||t;(typeof e._appConfig==\\"undefined\\"||!Object.isFrozen(e._appConfig))&&(e._appConfig=r);function o(){return\\"test\\"}console.log(o());})();
9+
"(()=>{var o={foo:\\"bar\\"},e=(typeof window==\\"undefined\\"?globalThis:window)||{},r=e._appConfig||o;(typeof e._appConfig==\\"undefined\\"||!Object.isFrozen(e._appConfig))&&(e._appConfig=r);function t(){return\\"test\\"}console.log(t());})();
1010
"
1111
`;
1212

1313
exports[`loads validation function 1`] = `
14-
"(()=>{var v={foo:\\"bar\\"},n=(typeof window==\\"undefined\\"?globalThis:window)||{},m=n._appConfig||v;(typeof n._appConfig==\\"undefined\\"||!Object.isFrozen(n._appConfig))&&(n._appConfig=m);function P(){let s={};return function(p){\\"use strict\\";p.exports=i,p.exports.default=i;var b={type:\\"object\\",additionalProperties:!1,properties:{foo:{type:\\"string\\"}},$schema:\\"http://json-schema.org/draft-07/schema#\\"};function i(o,t){\\"use strict\\";if(t)var a=t.dataPath,g=t.parentData,h=t.parentDataProperty,y=t.rootData;else var a=\\"\\",g=void 0,h=void 0,y=o;var e=null,r=0;if(o&&typeof o==\\"object\\"&&!Array.isArray(o)){for(var f in o)if(f!==\\"foo\\"){var d={keyword:\\"additionalProperties\\",dataPath:a,schemaPath:\\"#/additionalProperties\\",params:{additionalProperty:f},message:\\"should NOT have additional properties\\"};e===null?e=[d]:e.push(d),r++}if(o.foo!==void 0&&typeof o.foo!=\\"string\\"){var l={keyword:\\"type\\",dataPath:a+\\"/foo\\",schemaPath:\\"#/properties/foo/type\\",params:{type:\\"string\\"},message:\\"should be string\\"};e===null?e=[l]:e.push(l),r++}}else{var c={keyword:\\"type\\",dataPath:a,schemaPath:\\"#/type\\",params:{type:\\"object\\"},message:\\"should be object\\"};e===null?e=[c]:e.push(c),r++}return i.errors=e,r===0}}(s),s.exports}var u=P();u({foo:12});})();
14+
"(()=>{var h={foo:\\"bar\\"},n=(typeof window==\\"undefined\\"?globalThis:window)||{},v=n._appConfig||h;(typeof n._appConfig==\\"undefined\\"||!Object.isFrozen(n._appConfig))&&(n._appConfig=v);function P(){let s={};return function(p){\\"use strict\\";p.exports=i,p.exports.default=i;var b={type:\\"object\\",additionalProperties:!1,properties:{foo:{type:\\"string\\"}},$schema:\\"http://json-schema.org/draft-07/schema#\\"};function i(t,o){\\"use strict\\";if(o)var a=o.instancePath,g=o.parentData,m=o.parentDataProperty,y=o.rootData;else var a=\\"\\",g=void 0,m=void 0,y=t;var e=null,r=0;if(t&&typeof t==\\"object\\"&&!Array.isArray(t)){for(var f in t)if(f!==\\"foo\\"){var c={instancePath:a,schemaPath:\\"#/additionalProperties\\",keyword:\\"additionalProperties\\",params:{additionalProperty:f},message:\\"must NOT have additional properties\\"};e===null?e=[c]:e.push(c),r++}if(t.foo!==void 0&&typeof t.foo!=\\"string\\"){var u={instancePath:a+\\"/foo\\",schemaPath:\\"#/properties/foo/type\\",keyword:\\"type\\",params:{type:\\"string\\"},message:\\"must be string\\"};e===null?e=[u]:e.push(u),r++}}else{var d={instancePath:a,schemaPath:\\"#/type\\",keyword:\\"type\\",params:{type:\\"object\\"},message:\\"must be object\\"};e===null?e=[d]:e.push(d),r++}return i.errors=e,r===0}}(s),s.exports}var l=P();l({foo:12});})();
1515
"
1616
`;

app-config-esbuild/src/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ it('fails when config is incorrect', () =>
5555
write: false,
5656
}),
5757
).rejects.toThrow(
58-
'error: [plugin: @app-config/esbuild] Config is invalid: config should NOT have additional properties',
58+
'error: [plugin: @app-config/esbuild] Config is invalid: config must NOT have additional properties',
5959
);
6060
},
6161
));

0 commit comments

Comments
 (0)