@mablhq/mabl-cli 2.61.14 → 2.61.17

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.
@@ -288,7 +288,15 @@ function findFirstMatchingEvent(eventDefinition, listen) {
288
288
  }
289
289
  return { eventIndex, eventValue };
290
290
  }
291
- function createEmptyRequestEvent() {
291
+ function createEmptyRequestEvent(includeDefaultAssertion = true) {
292
+ const defaultAssertion = [
293
+ {
294
+ id: (0, uuid_1.v4)(),
295
+ assertTarget: newman_types_1.AssertionTarget.Status,
296
+ assertType: newman_types_1.AssertionType.Equals,
297
+ value: '200',
298
+ },
299
+ ];
292
300
  return {
293
301
  listen: exports.TEST_LISTEN,
294
302
  id: (0, exports.uuid)(),
@@ -297,14 +305,7 @@ function createEmptyRequestEvent() {
297
305
  raw: '',
298
306
  type: 'text/javascript',
299
307
  },
300
- mablAssertions: [
301
- {
302
- id: (0, uuid_1.v4)(),
303
- assertTarget: newman_types_1.AssertionTarget.Status,
304
- assertType: newman_types_1.AssertionType.Equals,
305
- value: '200',
306
- },
307
- ],
308
+ mablAssertions: includeDefaultAssertion ? defaultAssertion : [],
308
309
  mablVariables: [],
309
310
  mablSnippets: [],
310
311
  };
@@ -795,10 +796,10 @@ exports.PRE_REQUEST_LISTEN = 'prerequest';
795
796
  function splitLines(value) {
796
797
  return value.length ? value.split(/\r?\n/) : [];
797
798
  }
798
- function createEmptyRequestEventArray() {
799
- return [createEmptyRequestEvent()];
799
+ function createEmptyRequestEventArray(includeDefaultAssertion = true) {
800
+ return [createEmptyRequestEvent(includeDefaultAssertion)];
800
801
  }
801
- const createEmptyRequest = (id = (0, uuid_1.v4)()) => ({
802
+ const createEmptyRequest = (id = (0, uuid_1.v4)(), includeDefaultAssertion = true) => ({
802
803
  id,
803
804
  name: '',
804
805
  request: {
@@ -817,7 +818,7 @@ const createEmptyRequest = (id = (0, uuid_1.v4)()) => ({
817
818
  method: 'GET',
818
819
  url: '',
819
820
  },
820
- event: createEmptyRequestEventArray(),
821
+ event: createEmptyRequestEventArray(includeDefaultAssertion),
821
822
  });
822
823
  exports.createEmptyRequest = createEmptyRequest;
823
824
  function processPostmanItems(items, handleItem, handleFolder) {