ftmocks-utils 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ftmocks-utils",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Util functions for FtMocks",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -198,12 +198,12 @@ async function resetAllMockStats({testMockData, testConfig, testName}) {
198
198
  }
199
199
  }
200
200
 
201
- async function initiatePlaywrightRoutes (page, ftmocksConifg, testName) {
201
+ async function initiatePlaywrightRoutes (page, ftmocksConifg, testName, path = '**/*') {
202
202
  const testMockData = testName ? loadMockDataFromConfig(ftmocksConifg, testName) : [];
203
203
  resetAllMockStats({testMockData, testConfig: ftmocksConifg, testName});
204
204
  const defaultMockData = getDefaultMockDataFromConfig(ftmocksConifg);
205
205
  console.debug('calling initiatePlaywrightRoutes fetch');
206
- await page.route('**/*', async (route, request) => {
206
+ await page.route(path, async (route, request) => {
207
207
  const url = request.url();
208
208
  const options = {
209
209
  options: {