Skip to content

replace mocha+chai with flug? #84

@DanielJDufour

Description

@DanielJDufour

I'm weighing the pros and cons of replacing mocha and chai with flug.

Although they are popular, dependabot occasionally flags security vulnerabilities with these libraries and I'd rather not bother with the hassle if there is an alternative. Additionally, I prefer the simpler syntax of flug.

with mocha + cai

const should = require('chai').should(); // eslint-disable-line no-unused-vars

describe ('third mgrs set', () => {
  const mgrsStr = '11SPA7234911844';
  const point = [-115.0820944, 36.2361322];
  it('MGRS reference with highest accuracy correct.', () => {
    mgrs.forward(point).should.equal(mgrsStr);
  });
  it('MGRS reference with 0-digit accuracy correct.', () => {
    mgrs.forward(point, 0).should.equal('11SPA');
  });
});

with flug

test('third mgrs set', ({ eq }) => {
  const mgrsStr = '11SPA7234911844';
  const point = [-115.0820944, 36.2361322];
  eq(mgrs.forward(point), mgrsStr); // with highest accuracy
  eq(mgrs.forward(point, 0), '11SPA'); // with 0-digit accuracy
});

Open to your thoughts and opinions!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions