allure-js icon indicating copy to clipboard operation
allure-js copied to clipboard

allure is undefined during mocha runtime

Open jee-lee opened this issue 2 years ago • 0 comments

Hello! I am seeing this occurring when I try to run mocha in my es6 js project. The allure object is undefined while running mocha. I am using node 16.13.1 mocha 9.2.0 and allure-mocha 2.0.0-beta.19

import { expect } from 'chai';
import { allure } from 'allure-mocha/runtime.js';

describe('example test suite', () => {
  it('is some test', async => {
    allure.epic('Some info');
    const someNumber = 1;
    const newNumber = someNumber + 1;
    expect(newNumber).to.equal(2)
  })
})

I've attached my example project. example-js-allure.zip

Originally posted by @jee-lee in https://github.com/allure-framework/allure-js/issues/50#issuecomment-1235602677

jee-lee avatar Sep 07 '22 14:09 jee-lee