Skip to content

Commit

Permalink
chore: update generated docs (asyncapi#413)
Browse files Browse the repository at this point in the history
Co-authored-by: asyncapi-bot <[email protected]>
Co-authored-by: Lukasz Gornicki <[email protected]>
Co-authored-by: Matatjahu <[email protected]>
  • Loading branch information
4 people authored Nov 29, 2021
1 parent 3f8ca92 commit bd1423e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/parse_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ describe('memory usage', function () {
this.timeout(12500);
const asyncapi = fs.readFileSync(path.resolve(__dirname, './good/zbos_mqtt-all-asyncapi.json'), 'utf8');

for (let i = 0, l = 50; i < l; i++) {
for (let i = 0, l = 25; i < l; i++) {
await parser.parse(asyncapi);
const used = process.memoryUsage().heapUsed / 1024 / 1024;
expect(used < 100).to.equal(true); // less than 100 MB
Expand Down
5 changes: 1 addition & 4 deletions test/testsUtils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');
const { EOL } = require('os');
const eolLength = EOL.length;
const ParserError = require('../lib/errors/parser-error');

chai.use(chaiAsPromised);
Expand All @@ -15,10 +13,9 @@ const testsUtils = module.exports;
* @function offset
* @private
* @param {Number} oset end or start offset number
* @param {Number} line end or start line number
* @returns {Number} calculated offset number
*/
testsUtils.offset = (oset, line) => (oset + ((eolLength - 1) * (line - 1)));
testsUtils.offset = (oset) => oset;

/* eslint-disable sonarjs/cognitive-complexity */
/**
Expand Down

0 comments on commit bd1423e

Please sign in to comment.