You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Update plugin schema testing util and associated tests (#27574)
* Fix default
* validate matching options, add associated test
* fix error test
* it's only the mismatch that matters
* remove test, the utility can't handle external calls yet
* use when instead of async
* remove keys now that we're not using external
* fix typescript
* fix expected errors in tests
* missed some tests
it(`should provide meaningful errors when fields are invalid`,()=>{
114
+
it(`should provide meaningful errors when fields are invalid`,async()=>{
115
115
constexpectedErrors=[
116
-
`"precachePages" "[0]" must be a string. "[1]" must be a string. "[2]" must be a string`,
116
+
`"precachePages[0]" must be a string`,
117
+
`"precachePages[1]" must be a string`,
118
+
`"precachePages[2]" must be a string`,
117
119
`"appendScript" must be a string`,
118
120
`"debug" must be a boolean`,
119
-
`"workboxConfig" "importWorkboxFrom" must be a string. "globDirectory" must be a string. "globPatterns[0]" must be a string. "globPatterns[1]" must be a string. "globPatterns[2]" must be a string. "modifyURLPrefix./" must be a string. "cacheId" must be a string. "dontCacheBustURLsMatching" must be of type object. "runtimeCaching[0].handler" must be one of [StaleWhileRevalidate, CacheFirst, NetworkFirst, NetworkOnly, CacheOnly]. "runtimeCaching[1]" must be of type object. "runtimeCaching[2]" must be of type object. "skipWaiting" must be a boolean. "clientsClaim" must be a boolean`,
121
+
`"workboxConfig.importWorkboxFrom" must be a string`,
122
+
`"workboxConfig.globDirectory" must be a string`,
123
+
`"workboxConfig.globPatterns[0]" must be a string`,
124
+
`"workboxConfig.globPatterns[1]" must be a string`,
125
+
`"workboxConfig.globPatterns[2]" must be a string`,
126
+
`"workboxConfig.modifyURLPrefix./" must be a string`,
127
+
`"workboxConfig.cacheId" must be a string`,
128
+
`"workboxConfig.dontCacheBustURLsMatching" must be of type object`,
129
+
`"workboxConfig.runtimeCaching[0].handler" must be one of [StaleWhileRevalidate, CacheFirst, NetworkFirst, NetworkOnly, CacheOnly]`,
130
+
`"workboxConfig.runtimeCaching[1]" must be of type object`,
131
+
`"workboxConfig.runtimeCaching[2]" must be of type object`,
0 commit comments