-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chai import error #338
Comments
import * as chaiModule from "chai";
import chaiHttp from "chai-http";
const chai = chaiModule.use(chaiHttp); Should work as expected |
I'm trying to find a good way to use chai http
With
or
I got
Are they compatible? I would love a fully fonctionnal doc/sample/gist for request & request.agent latest compatible versions. I noticed that
|
They are compatible. The examples throughout the current readme should be working fine. They import You gave good example code but none for the actual test file where the problem arises. Just that "request is not a function". Maybe if you show us code you're trying to run that causes that error, we will figure something out |
I am import chai as chaiModule, but getting error like
import chaiModule from "chai";
^^^^^^^^^^
SyntaxError: The requested module 'chai' does not provide an export named 'default'
Code for Reference
and when Import like
import * as chai from 'chai',
getting error - chai.request is not a function,
I tried different way to import , but getting same error.
The text was updated successfully, but these errors were encountered: