Skip to content

Commit

Permalink
fix offset for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmatatjahu committed Nov 29, 2021
1 parent 85ffa14 commit f3a1676
Showing 1 changed file with 1 addition and 4 deletions.
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 f3a1676

Please sign in to comment.