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

JEST not recognizes the Allure

Open liliancunha opened this issue 1 year ago • 3 comments

Describe the bug I was trying to follow the configuration related to this repo https://github.com/allure-examples/allure-jest-example

The vs code did not recognize the library allure, so no methods are allowed

Expected behavior The methods have been recognized at the VS CODE.

Screenshots image image image image

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome

liliancunha avatar Apr 29 '24 23:04 liliancunha

Hi, could you try our project generator, please: https://allurereport.org/start/

eroshenkoam avatar May 03 '24 10:05 eroshenkoam

Hey @eroshenkoam,

This site only created empty projects, and unfortunately was not helpful. I tried using Javascript -> Mocha, Javascript -> Jest -> both formats browser and NodeJs Here are the files generated: project browser.zip project.zip project (1).zip

liliancunha avatar May 06 '24 12:05 liliancunha

Hey there. Try to add next import somewhere in your test setup files:

import "allure-jest"

The import will let vscode know about the types definitions

epszaw avatar May 14 '24 10:05 epszaw

starting 3.0.0, you can import Allure Runtime API from allure-js-commons:

import {
  label,
  link,
  issue,
  tms,
  step,
  attachment,
} from "allure-js-commons";
// or
import * as allure from "allure-js-commons";

baev avatar Jul 01 '24 09:07 baev