OpenApiTransformerBase

#transformCallback()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformPathItem on each value
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const callback = deepFreeze({
  'http://example.com': {},
  '$request.body#/url': {},
});
assert.deepStrictEqual(t.transformCallback(callback), callback);
const values = Object.values(callback);
sinon.assert.calledWith(t.transformPathItem, values[0]);
sinon.assert.calledWith(t.transformPathItem, values[1]);
sinon.assert.calledTwice(t.transformPathItem);
sinon.assert.alwaysCalledOn(t.transformPathItem, t);
sinon.assert.calledOnce(t.transformCallback);
assertOnlyCalledMethods(t, [t.transformCallback, t.transformPathItem]);
does not call transformPathItem on x- properties
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const callback = deepFreeze({ 'x-test': {} });
assert.deepStrictEqual(t.transformCallback(callback), callback);
sinon.assert.calledOnce(t.transformCallback);
assertOnlyCalledMethods(t, [t.transformCallback]);

#transformComponents()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformMap on schemas
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const components = deepFreeze({ schemas: {} });
assert.deepStrictEqual(t.transformComponents(components), components);
sinon.assert.calledWith(
  t.transformMap,
  components.schemas,
  t.transformSchema,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformComponents);
assertOnlyCalledMethods(t, [t.transformComponents, t.transformMap]);
calls transformMap on responses
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const components = deepFreeze({ responses: {} });
assert.deepStrictEqual(t.transformComponents(components), components);
sinon.assert.calledWith(
  t.transformMap,
  components.responses,
  t.transformResponse,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformComponents);
assertOnlyCalledMethods(t, [t.transformComponents, t.transformMap]);
calls transformMap on parameters
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const components = deepFreeze({ parameters: {} });
assert.deepStrictEqual(t.transformComponents(components), components);
sinon.assert.calledWith(
  t.transformMap,
  components.parameters,
  t.transformParameter,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformComponents);
assertOnlyCalledMethods(t, [t.transformComponents, t.transformMap]);
calls transformMap on examples
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const components = deepFreeze({ examples: {} });
assert.deepStrictEqual(t.transformComponents(components), components);
sinon.assert.calledWith(
  t.transformMap,
  components.examples,
  t.transformExample3,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformComponents);
assertOnlyCalledMethods(t, [t.transformComponents, t.transformMap]);
calls transformMap on requestBodies
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const components = deepFreeze({ requestBodies: {} });
assert.deepStrictEqual(t.transformComponents(components), components);
sinon.assert.calledWith(
  t.transformMap,
  components.requestBodies,
  t.transformRequestBody,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformComponents);
assertOnlyCalledMethods(t, [t.transformComponents, t.transformMap]);
calls transformMap on headers
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const components = deepFreeze({ headers: {} });
assert.deepStrictEqual(t.transformComponents(components), components);
sinon.assert.calledWith(
  t.transformMap,
  components.headers,
  t.transformHeader,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformComponents);
assertOnlyCalledMethods(t, [t.transformComponents, t.transformMap]);
calls transformMap on securitySchemes
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const components = deepFreeze({ securitySchemes: {} });
assert.deepStrictEqual(t.transformComponents(components), components);
sinon.assert.calledWith(
  t.transformMap,
  components.securitySchemes,
  t.transformSecurityScheme,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformComponents);
assertOnlyCalledMethods(t, [t.transformComponents, t.transformMap]);
calls transformMap on links
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const components = deepFreeze({ links: {} });
assert.deepStrictEqual(t.transformComponents(components), components);
sinon.assert.calledWith(
  t.transformMap,
  components.links,
  t.transformLink,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformComponents);
assertOnlyCalledMethods(t, [t.transformComponents, t.transformMap]);
calls transformMap on callbacks
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const components = deepFreeze({ callbacks: {} });
assert.deepStrictEqual(t.transformComponents(components), components);
sinon.assert.calledWith(
  t.transformMap,
  components.callbacks,
  t.transformCallback,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformComponents);
assertOnlyCalledMethods(t, [t.transformComponents, t.transformMap]);
calls transformMap on pathItems
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const components = deepFreeze({ pathItems: {} });
assert.deepStrictEqual(t.transformComponents(components), components);
sinon.assert.calledWith(
  t.transformMap,
  components.pathItems,
  t.transformPathItem,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformComponents);
assertOnlyCalledMethods(t, [t.transformComponents, t.transformMap]);

#transformContact()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);

#transformDiscriminator()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);

#transformEncoding()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformMap on headers
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const encoding = deepFreeze({ headers: {} });
assert.deepStrictEqual(t.transformEncoding(encoding), encoding);
sinon.assert.calledWith(
  t.transformMap,
  encoding.headers,
  t.transformHeader,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformEncoding);
assertOnlyCalledMethods(t, [t.transformEncoding, t.transformMap]);

#transformExample()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);

#transformExample3()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);

#transformExternalDocs()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);

#transformHeader()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformItems on items
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const header = deepFreeze({ items: {} });
assert.deepStrictEqual(t.transformHeader(header), header);
sinon.assert.calledWith(t.transformItems, header.items);
sinon.assert.calledOnce(t.transformItems);
sinon.assert.alwaysCalledOn(t.transformItems, t);
sinon.assert.calledOnce(t.transformHeader);
assertOnlyCalledMethods(t, [t.transformHeader, t.transformItems]);
calls transformSchema on schema
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const header = deepFreeze({ schema: {} });
assert.deepStrictEqual(t.transformHeader(header), header);
sinon.assert.calledWith(t.transformSchema, header.schema);
sinon.assert.calledOnce(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
sinon.assert.calledOnce(t.transformHeader);
assertOnlyCalledMethods(t, [t.transformHeader, t.transformSchema]);

#transformInfo()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformContact on contact
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const info = deepFreeze({ contact: {} });
assert.deepStrictEqual(t.transformInfo(info), info);
sinon.assert.calledWith(t.transformContact, info.contact);
sinon.assert.calledOnce(t.transformContact);
sinon.assert.alwaysCalledOn(t.transformContact, t);
sinon.assert.calledOnce(t.transformInfo);
assertOnlyCalledMethods(t, [t.transformInfo, t.transformContact]);
calls transformLicense on license
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const info = deepFreeze({ license: {} });
assert.deepStrictEqual(t.transformInfo(info), info);
sinon.assert.calledWith(t.transformLicense, info.license);
sinon.assert.calledOnce(t.transformLicense);
sinon.assert.alwaysCalledOn(t.transformLicense, t);
sinon.assert.calledOnce(t.transformInfo);
assertOnlyCalledMethods(t, [t.transformInfo, t.transformLicense]);

#transformItems()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformItems recursively on items
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const items = deepFreeze({ items: {} });
assert.deepStrictEqual(t.transformItems(items), items);
sinon.assert.calledWith(t.transformItems, items.items);
sinon.assert.calledTwice(t.transformItems);
sinon.assert.alwaysCalledOn(t.transformItems, t);
assertOnlyCalledMethods(t, [t.transformItems]);
does not call transformItems on undefined items
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const items = deepFreeze({ items: undefined });
assert.deepStrictEqual(t.transformItems(items), items);
sinon.assert.calledOnce(t.transformItems);
assertOnlyCalledMethods(t, [t.transformItems]);

#transformLicense()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);

#transformLink()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformServer on server
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const link = deepFreeze({ server: {} });
assert.deepStrictEqual(t.transformLink(link), link);
sinon.assert.calledWith(t.transformServer, link.server);
sinon.assert.calledOnce(t.transformServer);
sinon.assert.alwaysCalledOn(t.transformServer, t);
sinon.assert.calledOnce(t.transformLink);
assertOnlyCalledMethods(t, [t.transformLink, t.transformServer]);
does not call transformServer on undefined server
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const link = deepFreeze({ server: undefined });
assert.deepStrictEqual(t.transformLink(link), link);
sinon.assert.calledOnce(t.transformLink);
assertOnlyCalledMethods(t, [t.transformLink]);

#transformMap()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls its second argument on each property
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const mapper = sinon.stub().returns(true);
const obj = deepFreeze({
  a: 1,
  b: 2,
});
const t = sinon.spy(new OpenApiTransformerBase());
assert.deepStrictEqual(t.transformMap(obj, mapper), {
  a: true,
  b: true,
});
sinon.assert.calledWith(mapper, 1);
sinon.assert.calledWith(mapper, 2);
sinon.assert.calledTwice(mapper);
sinon.assert.alwaysCalledOn(mapper, t);
sinon.assert.calledOnce(t.transformMap);
assertOnlyCalledMethods(t, [t.transformMap]);
calls its second argument on x- properties
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const mapper = sinon.stub().returns(true);
const obj = deepFreeze({ 'x-test': 1 });
const t = sinon.spy(new OpenApiTransformerBase());
assert.deepStrictEqual(t.transformMap(obj, mapper), { 'x-test': true });
sinon.assert.calledWith(mapper, 1);
sinon.assert.calledOnce(mapper);
sinon.assert.alwaysCalledOn(mapper, t);
sinon.assert.calledOnce(t.transformMap);
assertOnlyCalledMethods(t, [t.transformMap]);
does not call its second argument on undefined values
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const mapper = sinon.stub().returns(true);
const obj = deepFreeze({
  a: 1,
  b: undefined,
});
const t = sinon.spy(new OpenApiTransformerBase());
assert.deepStrictEqual(t.transformMap(obj, mapper), {
  a: true,
  b: undefined,
});
sinon.assert.calledWith(mapper, 1);
sinon.assert.calledOnce(mapper);
sinon.assert.alwaysCalledOn(mapper, t);
sinon.assert.calledOnce(t.transformMap);
assertOnlyCalledMethods(t, [t.transformMap]);
does not map object prototype
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const mapper = sinon.stub().returns(true);
const obj = Object.create({ a: 1 });
obj.b = 2;
deepFreeze(obj);
const t = sinon.spy(new OpenApiTransformerBase());
assert.deepStrictEqual(t.transformMap(obj, mapper), { b: true });
sinon.assert.calledWith(mapper, 2);
sinon.assert.calledOnce(mapper);
sinon.assert.alwaysCalledOn(mapper, t);
sinon.assert.calledOnce(t.transformMap);
assertOnlyCalledMethods(t, [t.transformMap]);
does not map Array values
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const mapper = sinon.stub().returns(true);
const obj = deepFreeze([1, 2]);
const t = sinon.spy(new OpenApiTransformerBase());
assert.deepStrictEqual(t.transformMap(obj, mapper), obj);
sinon.assert.notCalled(mapper);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.calledOnce(t.warn);
assertOnlyCalledMethods(t, [t.transformMap, t.warn]);

#transformMediaType()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformSchema on schema
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const mediatype = deepFreeze({ schema: {} });
assert.deepStrictEqual(t.transformMediaType(mediatype), mediatype);
sinon.assert.calledWith(t.transformSchema, mediatype.schema);
sinon.assert.calledOnce(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
sinon.assert.calledOnce(t.transformMediaType);
assertOnlyCalledMethods(t, [t.transformMediaType, t.transformSchema]);
calls transformMap on examples
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const mediatype = deepFreeze({ examples: {} });
assert.deepStrictEqual(t.transformMediaType(mediatype), mediatype);
sinon.assert.calledWith(
  t.transformMap,
  mediatype.examples,
  t.transformExample3,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformMediaType);
assertOnlyCalledMethods(t, [t.transformMediaType, t.transformMap]);
calls transformMap on encodings
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const mediatype = deepFreeze({ encoding: {} });
assert.deepStrictEqual(t.transformMediaType(mediatype), mediatype);
sinon.assert.calledWith(
  t.transformMap,
  mediatype.encoding,
  t.transformEncoding,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformMediaType);
assertOnlyCalledMethods(t, [t.transformMediaType, t.transformMap]);

#transformOAuthFlow()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);

#transformOAuthFlows()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformOAuthFlow on implicit
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const oAuthFlows = deepFreeze({ implicit: {} });
assert.deepStrictEqual(t.transformOAuthFlows(oAuthFlows), oAuthFlows);
sinon.assert.calledWith(t.transformOAuthFlow, oAuthFlows.implicit);
sinon.assert.calledOnce(t.transformOAuthFlow);
sinon.assert.alwaysCalledOn(t.transformOAuthFlow, t);
sinon.assert.calledOnce(t.transformOAuthFlows);
assertOnlyCalledMethods(t, [t.transformOAuthFlows, t.transformOAuthFlow]);
calls transformOAuthFlow on password
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const oAuthFlows = deepFreeze({ password: {} });
assert.deepStrictEqual(t.transformOAuthFlows(oAuthFlows), oAuthFlows);
sinon.assert.calledWith(t.transformOAuthFlow, oAuthFlows.password);
sinon.assert.calledOnce(t.transformOAuthFlow);
sinon.assert.alwaysCalledOn(t.transformOAuthFlow, t);
sinon.assert.calledOnce(t.transformOAuthFlows);
assertOnlyCalledMethods(t, [t.transformOAuthFlows, t.transformOAuthFlow]);
calls transformOAuthFlow on clientCredentials
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const oAuthFlows = deepFreeze({ clientCredentials: {} });
assert.deepStrictEqual(t.transformOAuthFlows(oAuthFlows), oAuthFlows);
sinon.assert.calledWith(
  t.transformOAuthFlow,
  oAuthFlows.clientCredentials,
);
sinon.assert.calledOnce(t.transformOAuthFlow);
sinon.assert.alwaysCalledOn(t.transformOAuthFlow, t);
sinon.assert.calledOnce(t.transformOAuthFlows);
assertOnlyCalledMethods(t, [t.transformOAuthFlows, t.transformOAuthFlow]);
calls transformOAuthFlow on authorizationCode
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const oAuthFlows = deepFreeze({ authorizationCode: {} });
assert.deepStrictEqual(t.transformOAuthFlows(oAuthFlows), oAuthFlows);
sinon.assert.calledWith(
  t.transformOAuthFlow,
  oAuthFlows.authorizationCode,
);
sinon.assert.calledOnce(t.transformOAuthFlow);
sinon.assert.alwaysCalledOn(t.transformOAuthFlow, t);
sinon.assert.calledOnce(t.transformOAuthFlows);
assertOnlyCalledMethods(t, [t.transformOAuthFlows, t.transformOAuthFlow]);

#transformOpenApi()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformInfo on info
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const openApi = deepFreeze({ info: {} });
assert.deepStrictEqual(t.transformOpenApi(openApi), openApi);
sinon.assert.calledWith(t.transformInfo, openApi.info);
sinon.assert.calledOnce(t.transformInfo);
sinon.assert.alwaysCalledOn(t.transformInfo, t);
sinon.assert.calledOnce(t.transformOpenApi);
assertOnlyCalledMethods(t, [t.transformOpenApi, t.transformInfo]);
calls transformExternalDocs on externalDocs
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const openApi = deepFreeze({ externalDocs: {} });
assert.deepStrictEqual(t.transformOpenApi(openApi), openApi);
sinon.assert.calledWith(t.transformExternalDocs, openApi.externalDocs);
sinon.assert.calledOnce(t.transformExternalDocs);
sinon.assert.alwaysCalledOn(t.transformExternalDocs, t);
sinon.assert.calledOnce(t.transformOpenApi);
assertOnlyCalledMethods(t, [t.transformOpenApi, t.transformExternalDocs]);
calls transformArray on servers
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const openApi = deepFreeze({ servers: [] });
assert.deepStrictEqual(t.transformOpenApi(openApi), openApi);
sinon.assert.calledWith(
  t.transformArray,
  openApi.servers,
  t.transformServer,
);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformOpenApi);
assertOnlyCalledMethods(t, [t.transformOpenApi, t.transformArray]);
calls transformComponents on components
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const openApi = deepFreeze({ components: {} });
assert.deepStrictEqual(t.transformOpenApi(openApi), openApi);
sinon.assert.calledWith(t.transformComponents, openApi.components);
sinon.assert.calledOnce(t.transformComponents);
sinon.assert.alwaysCalledOn(t.transformComponents, t);
sinon.assert.calledOnce(t.transformOpenApi);
assertOnlyCalledMethods(t, [t.transformOpenApi, t.transformComponents]);
calls transformMap on definitions
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const openApi = deepFreeze({ definitions: {} });
assert.deepStrictEqual(t.transformOpenApi(openApi), openApi);
sinon.assert.calledWith(
  t.transformMap,
  openApi.definitions,
  t.transformSchema,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformOpenApi);
assertOnlyCalledMethods(t, [t.transformOpenApi, t.transformMap]);
calls transformMap on parameters
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const openApi = deepFreeze({ parameters: {} });
assert.deepStrictEqual(t.transformOpenApi(openApi), openApi);
sinon.assert.calledWith(
  t.transformMap,
  openApi.parameters,
  t.transformParameter,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformOpenApi);
assertOnlyCalledMethods(t, [t.transformOpenApi, t.transformMap]);
calls transformArray on x-ms-parameterized-host parameters
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const parameters = [];
const openApi = deepFreeze({
  'x-ms-parameterized-host': {
    hostTemplate: 'example.{tld}',
    parameters,
  },
});
assert.deepStrictEqual(t.transformOpenApi(openApi), openApi);
sinon.assert.calledWith(
  t.transformArray,
  parameters,
  t.transformParameter,
);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformOpenApi);
assertOnlyCalledMethods(t, [t.transformOpenApi, t.transformArray]);
calls transformResponse on responses
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const openApi = deepFreeze({ responses: {} });
assert.deepStrictEqual(t.transformOpenApi(openApi), openApi);
sinon.assert.calledWith(
  t.transformMap,
  openApi.responses,
  t.transformResponse,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformOpenApi);
assertOnlyCalledMethods(t, [t.transformOpenApi, t.transformMap]);
calls transformPaths on paths
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const openApi = deepFreeze({ paths: {} });
assert.deepStrictEqual(t.transformOpenApi(openApi), openApi);
sinon.assert.calledWith(t.transformPaths, openApi.paths);
sinon.assert.calledOnce(t.transformPaths);
sinon.assert.alwaysCalledOn(t.transformPaths, t);
sinon.assert.calledOnce(t.transformOpenApi);
assertOnlyCalledMethods(t, [t.transformOpenApi, t.transformPaths]);
calls transformPaths on x-ms-paths
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const openApi = deepFreeze({ 'x-ms-paths': {} });
assert.deepStrictEqual(t.transformOpenApi(openApi), openApi);
sinon.assert.calledWith(t.transformPaths, openApi['x-ms-paths']);
sinon.assert.calledOnce(t.transformPaths);
sinon.assert.alwaysCalledOn(t.transformPaths, t);
sinon.assert.calledOnce(t.transformOpenApi);
assertOnlyCalledMethods(t, [t.transformOpenApi, t.transformPaths]);
calls transformMap on webhooks
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const openApi = deepFreeze({ webhooks: {} });
assert.deepStrictEqual(t.transformOpenApi(openApi), openApi);
sinon.assert.calledWith(
  t.transformMap,
  openApi.webhooks,
  t.transformPathItem,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformOpenApi);
assertOnlyCalledMethods(t, [t.transformOpenApi, t.transformMap]);
calls transformArray on security
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const openApi = deepFreeze({ security: [] });
assert.deepStrictEqual(t.transformOpenApi(openApi), openApi);
sinon.assert.calledWith(
  t.transformArray,
  openApi.security,
  t.transformSecurityRequirement,
);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformOpenApi);
assertOnlyCalledMethods(t, [t.transformOpenApi, t.transformArray]);
calls transformArray on tags
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const openApi = deepFreeze({ tags: [] });
assert.deepStrictEqual(t.transformOpenApi(openApi), openApi);
sinon.assert.calledWith(
  t.transformArray,
  openApi.tags,
  t.transformTag,
);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformOpenApi);
assertOnlyCalledMethods(t, [t.transformOpenApi, t.transformArray]);

#transformOperation()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformExternalDocs on externalDocs
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = deepFreeze({ externalDocs: {} });
assert.deepStrictEqual(t.transformOperation(operation), operation);
sinon.assert.calledWith(t.transformExternalDocs, operation.externalDocs);
sinon.assert.calledOnce(t.transformExternalDocs);
sinon.assert.alwaysCalledOn(t.transformExternalDocs, t);
sinon.assert.calledOnce(t.transformOperation);
assertOnlyCalledMethods(t, [
  t.transformOperation,
  t.transformExternalDocs,
]);
calls transformArray on parameters
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const parameters = [];
const operation = deepFreeze({ parameters });
assert.deepStrictEqual(t.transformOperation(operation), operation);
sinon.assert.calledWith(
  t.transformArray,
  parameters,
  t.transformParameter,
);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformOperation);
assertOnlyCalledMethods(t, [t.transformOperation, t.transformArray]);
calls transformRequestBody on requestBody
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = deepFreeze({ requestBody: {} });
assert.deepStrictEqual(t.transformOperation(operation), operation);
sinon.assert.calledWith(t.transformRequestBody, operation.requestBody);
sinon.assert.calledOnce(t.transformRequestBody);
sinon.assert.alwaysCalledOn(t.transformRequestBody, t);
sinon.assert.calledOnce(t.transformOperation);
assertOnlyCalledMethods(t, [
  t.transformOperation,
  t.transformRequestBody,
]);
calls transformResponses on responses
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = deepFreeze({ responses: {} });
assert.deepStrictEqual(t.transformOperation(operation), operation);
sinon.assert.calledWith(t.transformResponses, operation.responses);
sinon.assert.calledOnce(t.transformResponses);
sinon.assert.alwaysCalledOn(t.transformResponses, t);
sinon.assert.calledOnce(t.transformOperation);
assertOnlyCalledMethods(t, [t.transformOperation, t.transformResponses]);
calls transformMap on callbacks
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = deepFreeze({ callbacks: {} });
assert.deepStrictEqual(t.transformOperation(operation), operation);
sinon.assert.calledWith(
  t.transformMap,
  operation.callbacks,
  t.transformCallback,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformOperation);
assertOnlyCalledMethods(t, [t.transformOperation, t.transformMap]);
calls transformArray on security
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const security = [];
const operation = deepFreeze({ security });
assert.deepStrictEqual(t.transformOperation(operation), operation);
sinon.assert.calledWith(
  t.transformArray,
  security,
  t.transformSecurityRequirement,
);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformOperation);
assertOnlyCalledMethods(t, [t.transformOperation, t.transformArray]);
calls transformArray on servers
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const servers = [];
const operation = deepFreeze({ servers });
assert.deepStrictEqual(t.transformOperation(operation), operation);
sinon.assert.calledWith(t.transformArray, servers, t.transformServer);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformOperation);
assertOnlyCalledMethods(t, [t.transformOperation, t.transformArray]);

#transformParameter()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformMap on content
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const parameter = deepFreeze({ content: {} });
assert.deepStrictEqual(t.transformParameter(parameter), parameter);
sinon.assert.calledWith(
  t.transformMap,
  parameter.content,
  t.transformMediaType,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformParameter);
assertOnlyCalledMethods(t, [t.transformParameter, t.transformMap]);
calls transformSchema on schema
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const parameter = deepFreeze({ schema: {} });
assert.deepStrictEqual(t.transformParameter(parameter), parameter);
sinon.assert.calledWith(t.transformSchema, parameter.schema);
sinon.assert.calledOnce(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
sinon.assert.calledOnce(t.transformParameter);
assertOnlyCalledMethods(t, [t.transformParameter, t.transformSchema]);
calls transformItems on items
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const parameter = deepFreeze({ items: {} });
assert.deepStrictEqual(t.transformParameter(parameter), parameter);
sinon.assert.calledWith(t.transformItems, parameter.items);
sinon.assert.calledOnce(t.transformItems);
sinon.assert.alwaysCalledOn(t.transformItems, t);
sinon.assert.calledOnce(t.transformParameter);
assertOnlyCalledMethods(t, [t.transformParameter, t.transformItems]);
calls transformMap on examples
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const parameter = deepFreeze({ examples: {} });
assert.deepStrictEqual(t.transformParameter(parameter), parameter);
sinon.assert.calledWith(
  t.transformMap,
  parameter.examples,
  t.transformExample3,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformParameter);
assertOnlyCalledMethods(t, [t.transformParameter, t.transformMap]);

#transformPathItem()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformArray on parameters
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const parameters = [];
const pathItem = deepFreeze({ parameters });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(
  t.transformArray,
  parameters,
  t.transformParameter,
);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformArray]);
calls transformArray on servers
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const servers = [];
const pathItem = deepFreeze({ servers });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformArray, servers, t.transformServer);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformArray]);
calls transformOperation on delete
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [method]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on DELETE
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [methodUpper]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on get
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [method]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on GET
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [methodUpper]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on head
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [method]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on HEAD
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [methodUpper]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on options
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [method]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on OPTIONS
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [methodUpper]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on patch
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [method]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on PATCH
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [methodUpper]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on post
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [method]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on POST
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [methodUpper]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on put
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [method]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on PUT
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [methodUpper]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on trace
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [method]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
calls transformOperation on TRACE
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const operation = {};
const pathItem = deepFreeze({ [methodUpper]: operation });
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledWith(t.transformOperation, operation);
sinon.assert.calledOnce(t.transformOperation);
sinon.assert.alwaysCalledOn(t.transformOperation, t);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem, t.transformOperation]);
does not call transformOperation on non-method props
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const pathItem = deepFreeze({
  summary: {},
  description: {},
  'x-get': {},
});
assert.deepStrictEqual(t.transformPathItem(pathItem), pathItem);
sinon.assert.calledOnce(t.transformPathItem);
assertOnlyCalledMethods(t, [t.transformPathItem]);

#transformPaths()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformPathItem on each value for / props
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const paths = deepFreeze({
  '/path1': {},
  '/path2': {},
});
assert.deepStrictEqual(t.transformPaths(paths), paths);
const values = Object.values(paths);
sinon.assert.calledWith(t.transformPathItem, values[0]);
sinon.assert.calledWith(t.transformPathItem, values[1]);
sinon.assert.calledTwice(t.transformPathItem);
sinon.assert.alwaysCalledOn(t.transformPathItem, t);
sinon.assert.calledOnce(t.transformPaths);
assertOnlyCalledMethods(t, [t.transformPaths, t.transformPathItem]);
calls transformPathItem on each value for non-/ props
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const paths = deepFreeze({
  path1: {},
  path2: {},
});
assert.deepStrictEqual(t.transformPaths(paths), paths);
const values = Object.values(paths);
sinon.assert.calledWith(t.transformPathItem, values[0]);
sinon.assert.calledWith(t.transformPathItem, values[1]);
sinon.assert.calledTwice(t.transformPathItem);
sinon.assert.alwaysCalledOn(t.transformPathItem, t);
sinon.assert.calledOnce(t.transformPaths);
assertOnlyCalledMethods(t, [t.transformPaths, t.transformPathItem]);
does not call transformPathItem on x- properties
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const paths = deepFreeze({ 'x-test': {} });
assert.deepStrictEqual(t.transformPaths(paths), paths);
sinon.assert.calledOnce(t.transformPaths);
assertOnlyCalledMethods(t, [t.transformPaths]);

#transformRequestBody()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformMap on content
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const requestBody = deepFreeze({ content: {} });
assert.deepStrictEqual(t.transformRequestBody(requestBody), requestBody);
sinon.assert.calledWith(
  t.transformMap,
  requestBody.content,
  t.transformMediaType,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformRequestBody);
assertOnlyCalledMethods(t, [t.transformRequestBody, t.transformMap]);
does not call transformMap on undefined content
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const requestBody = deepFreeze({ content: undefined });
assert.deepStrictEqual(t.transformRequestBody(requestBody), requestBody);
sinon.assert.calledOnce(t.transformRequestBody);
assertOnlyCalledMethods(t, [t.transformRequestBody]);

#transformResponse()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformMap on headers
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const response = deepFreeze({ headers: {} });
assert.deepStrictEqual(t.transformResponse(response), response);
sinon.assert.calledWith(
  t.transformMap,
  response.headers,
  t.transformHeader,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformResponse);
assertOnlyCalledMethods(t, [t.transformResponse, t.transformMap]);
calls transformMap on content
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const response = deepFreeze({ content: {} });
assert.deepStrictEqual(t.transformResponse(response), response);
sinon.assert.calledWith(
  t.transformMap,
  response.content,
  t.transformMediaType,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformResponse);
assertOnlyCalledMethods(t, [t.transformResponse, t.transformMap]);
calls transformMap on links
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const response = deepFreeze({ links: {} });
assert.deepStrictEqual(t.transformResponse(response), response);
sinon.assert.calledWith(
  t.transformMap,
  response.links,
  t.transformLink,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformResponse);
assertOnlyCalledMethods(t, [t.transformResponse, t.transformMap]);
calls transformSchema on schema
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const response = deepFreeze({ schema: {} });
assert.deepStrictEqual(t.transformResponse(response), response);
sinon.assert.calledWith(t.transformSchema, response.schema);
sinon.assert.calledOnce(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
sinon.assert.calledOnce(t.transformResponse);
assertOnlyCalledMethods(t, [t.transformResponse, t.transformSchema]);
calls transformExample on examples
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const response = deepFreeze({ examples: {} });
assert.deepStrictEqual(t.transformResponse(response), response);
sinon.assert.calledWith(t.transformExample, response.examples);
sinon.assert.calledOnce(t.transformExample);
sinon.assert.alwaysCalledOn(t.transformExample, t);
sinon.assert.calledOnce(t.transformResponse);
assertOnlyCalledMethods(t, [t.transformResponse, t.transformExample]);

#transformResponses()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformResponse on default property
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const responses = deepFreeze({ default: {} });
assert.deepStrictEqual(t.transformResponses(responses), responses);
sinon.assert.calledWith(t.transformResponse, responses.default);
sinon.assert.calledOnce(t.transformResponse);
sinon.assert.alwaysCalledOn(t.transformResponse, t);
sinon.assert.calledOnce(t.transformResponses);
assertOnlyCalledMethods(t, [t.transformResponses, t.transformResponse]);
calls transformResponse on 200 property
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const responses = deepFreeze({ 200: {} });
assert.deepStrictEqual(t.transformResponses(responses), responses);
sinon.assert.calledWith(t.transformResponse, responses[200]);
sinon.assert.calledOnce(t.transformResponse);
sinon.assert.alwaysCalledOn(t.transformResponse, t);
sinon.assert.calledOnce(t.transformResponses);
assertOnlyCalledMethods(t, [t.transformResponses, t.transformResponse]);
calls transformResponse on 2XX property
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const responses = deepFreeze({ '2XX': {} });
assert.deepStrictEqual(t.transformResponses(responses), responses);
sinon.assert.calledWith(t.transformResponse, responses['2XX']);
sinon.assert.calledOnce(t.transformResponse);
sinon.assert.alwaysCalledOn(t.transformResponse, t);
sinon.assert.calledOnce(t.transformResponses);
assertOnlyCalledMethods(t, [t.transformResponses, t.transformResponse]);
does not call transformResponse on x- property
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const responses = deepFreeze({ 'x-other': {} });
assert.deepStrictEqual(t.transformResponses(responses), responses);
sinon.assert.notCalled(t.transformResponse);
sinon.assert.calledOnce(t.transformResponses);
assertOnlyCalledMethods(t, [t.transformResponses]);

#transformSchema()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformDiscriminator on discriminator
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ discriminator: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformDiscriminator, schema.discriminator);
sinon.assert.calledOnce(t.transformDiscriminator);
sinon.assert.alwaysCalledOn(t.transformDiscriminator, t);
sinon.assert.calledOnce(t.transformSchema);
assertOnlyCalledMethods(t, [t.transformSchema, t.transformDiscriminator]);
calls transformExternalDocs on externalDocs
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ externalDocs: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformExternalDocs, schema.externalDocs);
sinon.assert.calledOnce(t.transformExternalDocs);
sinon.assert.alwaysCalledOn(t.transformExternalDocs, t);
sinon.assert.calledOnce(t.transformSchema);
assertOnlyCalledMethods(t, [t.transformSchema, t.transformExternalDocs]);
calls transformXml on xml
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ xml: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformXml, schema.xml);
sinon.assert.calledOnce(t.transformXml);
sinon.assert.alwaysCalledOn(t.transformXml, t);
sinon.assert.calledOnce(t.transformSchema);
assertOnlyCalledMethods(t, [t.transformSchema, t.transformXml]);
calls transformSchemaProperties on properties
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ properties: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformSchemaProperties, schema.properties);
sinon.assert.calledOnce(t.transformSchemaProperties);
sinon.assert.alwaysCalledOn(t.transformSchemaProperties, t);
sinon.assert.calledOnce(t.transformSchema);
assertOnlyCalledMethods(t, [
  t.transformSchema,
  t.transformSchemaProperties,
]);
calls transformSchema on non-Array items
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ items: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformSchema, schema.items);
sinon.assert.calledTwice(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformArray on Array items element
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const items = [];
const schema = deepFreeze({ items });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformArray, items, t.transformSchema);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformSchema);
assertOnlyCalledMethods(t, [t.transformSchema, t.transformArray]);
calls transformSchema on additionalItems
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaProp]: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformSchema, schema[schemaProp]);
sinon.assert.calledTwice(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformSchema on additionalProperties
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaProp]: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformSchema, schema[schemaProp]);
sinon.assert.calledTwice(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformSchema on contains
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaProp]: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformSchema, schema[schemaProp]);
sinon.assert.calledTwice(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformSchema on else
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaProp]: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformSchema, schema[schemaProp]);
sinon.assert.calledTwice(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformSchema on if
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaProp]: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformSchema, schema[schemaProp]);
sinon.assert.calledTwice(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformSchema on not
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaProp]: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformSchema, schema[schemaProp]);
sinon.assert.calledTwice(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformSchema on propertyNames
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaProp]: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformSchema, schema[schemaProp]);
sinon.assert.calledTwice(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformSchema on then
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaProp]: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformSchema, schema[schemaProp]);
sinon.assert.calledTwice(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformSchema on unevaluatedItems
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaProp]: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformSchema, schema[schemaProp]);
sinon.assert.calledTwice(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformSchema on unevaluatedProperties
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaProp]: {} });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformSchema, schema[schemaProp]);
sinon.assert.calledTwice(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformSchema on each value of dependentSchemas
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({
  [schemaMapProp]: {
    a: {},
    b: {},
  },
});
assert.deepStrictEqual(t.transformSchema(schema), schema);
const values = Object.values(schema[schemaMapProp]);
sinon.assert.calledWith(t.transformSchema, values[0]);
sinon.assert.calledWith(t.transformSchema, values[1]);
sinon.assert.callCount(t.transformSchema, 3);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformSchema on x- dependentSchemas
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaMapProp]: { 'x-test': {} } });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(
  t.transformSchema,
  schema[schemaMapProp]['x-test'],
);
sinon.assert.calledTwice(t.transformSchema);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformSchema on each value of patternProperties
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({
  [schemaMapProp]: {
    a: {},
    b: {},
  },
});
assert.deepStrictEqual(t.transformSchema(schema), schema);
const values = Object.values(schema[schemaMapProp]);
sinon.assert.calledWith(t.transformSchema, values[0]);
sinon.assert.calledWith(t.transformSchema, values[1]);
sinon.assert.callCount(t.transformSchema, 3);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformSchema on x- patternProperties
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaMapProp]: { 'x-test': {} } });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(
  t.transformSchema,
  schema[schemaMapProp]['x-test'],
);
sinon.assert.calledTwice(t.transformSchema);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformArray on Array allOf
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schemas = [];
const schema = deepFreeze({ [schemaArrayProp]: schemas });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformArray, schemas, t.transformSchema);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformSchema);
assertOnlyCalledMethods(t, [t.transformSchema, t.transformArray]);
calls transformArray on non-Array allOf
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schemas = {};
const schema = deepFreeze({ [schemaArrayProp]: schemas });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformArray, schemas, t.transformSchema);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformSchema);
sinon.assert.calledOnce(t.warn);
assertOnlyCalledMethods(t, [
  t.transformSchema,
  t.transformArray,
  t.warn,
]);
does not transformSchema on undefined allOf
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaArrayProp]: undefined });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledOnce(t.transformSchema);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformArray on Array anyOf
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schemas = [];
const schema = deepFreeze({ [schemaArrayProp]: schemas });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformArray, schemas, t.transformSchema);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformSchema);
assertOnlyCalledMethods(t, [t.transformSchema, t.transformArray]);
calls transformArray on non-Array anyOf
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schemas = {};
const schema = deepFreeze({ [schemaArrayProp]: schemas });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformArray, schemas, t.transformSchema);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformSchema);
sinon.assert.calledOnce(t.warn);
assertOnlyCalledMethods(t, [
  t.transformSchema,
  t.transformArray,
  t.warn,
]);
does not transformSchema on undefined anyOf
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaArrayProp]: undefined });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledOnce(t.transformSchema);
assertOnlyCalledMethods(t, [t.transformSchema]);
calls transformArray on Array oneOf
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schemas = [];
const schema = deepFreeze({ [schemaArrayProp]: schemas });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformArray, schemas, t.transformSchema);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformSchema);
assertOnlyCalledMethods(t, [t.transformSchema, t.transformArray]);
calls transformArray on non-Array oneOf
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schemas = {};
const schema = deepFreeze({ [schemaArrayProp]: schemas });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledWith(t.transformArray, schemas, t.transformSchema);
sinon.assert.calledOnce(t.transformArray);
sinon.assert.alwaysCalledOn(t.transformArray, t);
sinon.assert.calledOnce(t.transformSchema);
sinon.assert.calledOnce(t.warn);
assertOnlyCalledMethods(t, [
  t.transformSchema,
  t.transformArray,
  t.warn,
]);
does not transformSchema on undefined oneOf
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ [schemaArrayProp]: undefined });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledOnce(t.transformSchema);
assertOnlyCalledMethods(t, [t.transformSchema]);
does not transform examples
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const schema = deepFreeze({ examples: [{}] });
assert.deepStrictEqual(t.transformSchema(schema), schema);
sinon.assert.calledOnce(t.transformSchema);
assertOnlyCalledMethods(t, [t.transformSchema]);

#transformSchemaProperties()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformSchema on each value
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const properties = deepFreeze({
  a: {},
  b: {},
});
assert.deepStrictEqual(
  t.transformSchemaProperties(properties),
  properties,
);
const values = Object.values(properties);
sinon.assert.calledWith(t.transformSchema, values[0]);
sinon.assert.calledWith(t.transformSchema, values[1]);
sinon.assert.calledTwice(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
sinon.assert.calledOnce(t.transformSchemaProperties);
assertOnlyCalledMethods(t, [
  t.transformSchemaProperties,
  t.transformSchema,
]);
calls transformSchema on x- properties
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const properties = deepFreeze({ 'x-test': {} });
assert.deepStrictEqual(
  t.transformSchemaProperties(properties),
  properties,
);
sinon.assert.calledWith(t.transformSchema, properties['x-test']);
sinon.assert.calledOnce(t.transformSchema);
sinon.assert.alwaysCalledOn(t.transformSchema, t);
sinon.assert.calledOnce(t.transformSchemaProperties);
assertOnlyCalledMethods(t, [
  t.transformSchemaProperties,
  t.transformSchema,
]);

#transformSecurityRequirement()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);

#transformSecurityScheme()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformOAuthFlows on flows
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const securityScheme = deepFreeze({ flows: {} });
assert.deepStrictEqual(
  t.transformSecurityScheme(securityScheme),
  securityScheme,
);
sinon.assert.calledWith(t.transformOAuthFlows, securityScheme.flows);
sinon.assert.calledOnce(t.transformOAuthFlows);
sinon.assert.alwaysCalledOn(t.transformOAuthFlows, t);
sinon.assert.calledOnce(t.transformSecurityScheme);
assertOnlyCalledMethods(t, [
  t.transformSecurityScheme,
  t.transformOAuthFlows,
]);
does not call transformOAuthFlows on undefined flows
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const securityScheme = deepFreeze({ flows: undefined });
assert.deepStrictEqual(
  t.transformSecurityScheme(securityScheme),
  securityScheme,
);
sinon.assert.calledOnce(t.transformSecurityScheme);
assertOnlyCalledMethods(t, [t.transformSecurityScheme]);

#transformServer()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformMap on variables
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const server = deepFreeze({ variables: {} });
assert.deepStrictEqual(t.transformServer(server), server);
sinon.assert.calledWith(
  t.transformMap,
  server.variables,
  t.transformServerVariable,
);
sinon.assert.calledOnce(t.transformMap);
sinon.assert.alwaysCalledOn(t.transformMap, t);
sinon.assert.calledOnce(t.transformServer);
assertOnlyCalledMethods(t, [t.transformServer, t.transformMap]);
does not call transformServerVariables on undefined variables
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const server = deepFreeze({ variables: undefined });
assert.deepStrictEqual(t.transformServer(server), server);
sinon.assert.calledOnce(t.transformServer);
assertOnlyCalledMethods(t, [t.transformServer]);

#transformServerVariable()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);

#transformTag()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);
calls transformExternalDocs on externalDocs
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const tag = deepFreeze({ externalDocs: {} });
assert.deepStrictEqual(t.transformTag(tag), tag);
sinon.assert.calledWith(t.transformExternalDocs, tag.externalDocs);
sinon.assert.calledOnce(t.transformExternalDocs);
sinon.assert.alwaysCalledOn(t.transformExternalDocs, t);
sinon.assert.calledOnce(t.transformTag);
assertOnlyCalledMethods(t, [t.transformTag, t.transformExternalDocs]);
does not call transformExternalDocs on undefined externalDocs
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const t = sinon.spy(new OpenApiTransformerBase());
const tag = deepFreeze({ externalDocs: undefined });
assert.deepStrictEqual(t.transformTag(tag), tag);
sinon.assert.calledOnce(t.transformTag);
assertOnlyCalledMethods(t, [t.transformTag]);

#transformXml()

transforms undefined to undefined
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms null to null
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms false to false
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms true to true
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 0 to 0
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 1 to 1
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms '' to ''
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms 'x' to 'x'
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName](arg);
assert.strictEqual(result, arg);
transforms [] to []
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]([]);
assert(Array.isArray(result), 'result isArray');
assert.strictEqual(result.length, 0);
transforms {} to {}
/home/kevin/src/node-projects/openapi-transformer-base/test/index.js
const transformer = new OpenApiTransformerBase();
const result = transformer[methodName]({});
assert.strictEqual(typeof result, 'object');
assert.notStrictEqual(result, null);

toJsonPointer

converts [] to /
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
converts ["a"] to /a
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
converts ["a","b"] to /a/b
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
converts ["/"] to /~1
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
converts ["~"] to /~0
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
converts ["/a"] to /~1a
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
converts ["~a"] to /~0a
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
converts ["a/"] to /a~1
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
converts ["a~"] to /a~0
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
converts ["a/b"] to /a~1b
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
converts ["a~b"] to /a~0b
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
converts ["a~0b"] to /a~00b
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
converts ["a~1b"] to /a~01b
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
converts ["a/~b"] to /a~1~0b
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
converts ["a~/b"] to /a~0~1b
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.strictEqual(toJsonPointer(propPath), ptr);
throws TypeError with no argument
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.throws(
  () => toJsonPointer(),
  TypeError,
);
throws TypeError with string argument
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.throws(
  () => toJsonPointer('foo'),
  TypeError,
);
throws TypeError with number path item
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.throws(
  () => toJsonPointer([1]),
  TypeError,
);
throws TypeError with object path item
/home/kevin/src/node-projects/openapi-transformer-base/test/lib/to-json-pointer.js
assert.throws(
  () => toJsonPointer([{}]),
  TypeError,
);

visit

calls method with 1 arg
/home/kevin/src/node-projects/openapi-transformer-base/test/visit.js
const transformer = new OpenApiTransformerBase();
const method = sinon.spy();
const arg = {};
visit(transformer, method, 'propName', arg);
sinon.assert.calledWithExactly(method, arg);
sinon.assert.calledOnce(method);
sinon.assert.alwaysCalledOn(method, transformer);
calls method with 2 args
/home/kevin/src/node-projects/openapi-transformer-base/test/visit.js
const transformer = new OpenApiTransformerBase();
const method = sinon.spy();
const arg1 = {};
const arg2 = {};
visit(transformer, method, 'propName', arg1, arg2);
sinon.assert.calledWithExactly(method, arg1, arg2);
sinon.assert.calledOnce(method);
sinon.assert.alwaysCalledOn(method, transformer);
returns value from method
/home/kevin/src/node-projects/openapi-transformer-base/test/visit.js
const transformer = new OpenApiTransformerBase();
const retval = {};
const method = () => retval;
assert.strictEqual(visit(transformer, method, 'propName'), retval);
adds propName to #transformPath during visit
/home/kevin/src/node-projects/openapi-transformer-base/test/visit.js
const transformer = new OpenApiTransformerBase();
const { transformPath } = transformer;
assert.deepStrictEqual(transformPath, []);
const propName = 'propName';
let called = false;
function method() {
  assert(!called);
  called = true;
  assert.deepStrictEqual(transformPath, [propName]);
}
visit(transformer, method, propName);
assert(called);
assert.deepStrictEqual(transformPath, []);
removes propName from #transformPath on exception
/home/kevin/src/node-projects/openapi-transformer-base/test/visit.js
const transformer = new OpenApiTransformerBase();
const { transformPath } = transformer;
assert.deepStrictEqual(transformPath, []);
const propName = 'propName';
const errTest = new Error('test');
function method() {
  throw errTest;
}
try {
  visit(transformer, method, propName);
  assert.fail();
} catch (err) {
  assert.strictEqual(err, errTest);
  assert.deepStrictEqual(transformPath, []);
}
adds copy of #transformPath to Error exception
/home/kevin/src/node-projects/openapi-transformer-base/test/visit.js
const transformer = new OpenApiTransformerBase();
const { transformPath } = transformer;
assert.deepStrictEqual(transformPath, []);
const propName = 'propName';
const errTest = new Error('test');
function method() {
  throw errTest;
}
try {
  visit(transformer, method, propName);
  assert.fail();
} catch (err) {
  assert.strictEqual(err, errTest);
  assert.deepStrictEqual(err.transformPath, ['propName']);
  assert.deepStrictEqual(transformPath, []);
}
does not set #transformPath on non-Error exception
/home/kevin/src/node-projects/openapi-transformer-base/test/visit.js
const transformer = new OpenApiTransformerBase();
const { transformPath } = transformer;
assert.deepStrictEqual(transformPath, []);
const propName = 'propName';
const errTest = {};
function method() {
  throw errTest;
}
try {
  visit(transformer, method, propName);
  assert.fail();
} catch (err) {
  assert.strictEqual(err, errTest);
  assert(!hasOwnProperty.call(err, 'transformPath'));
  assert.deepStrictEqual(transformPath, []);
}
does not clobber exception if #transformPath is inconsistent
/home/kevin/src/node-projects/openapi-transformer-base/test/visit.js
const transformer = new OpenApiTransformerBase();
const { transformPath } = transformer;
assert.deepStrictEqual(transformPath, []);
const propName = 'propName';
const errTest = new Error('test');
function method() {
  transformPath.push('surprise');
  throw errTest;
}
try {
  visit(transformer, method, propName);
  assert.fail();
} catch (err) {
  assert.strictEqual(err, errTest);
}
does not clobber exception if #transformPath is empty
/home/kevin/src/node-projects/openapi-transformer-base/test/visit.js
const transformer = new OpenApiTransformerBase();
const { transformPath } = transformer;
assert.deepStrictEqual(transformPath, []);
const propName = 'propName';
const errTest = new Error('test');
function method() {
  transformPath.pop();
  throw errTest;
}
try {
  visit(transformer, method, propName);
  assert.fail();
} catch (err) {
  assert.strictEqual(err, errTest);
}