Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

import { OpenAPIObject } from "openapi3-ts/src/model/openapi31" doesn't work with mocha and ESM #107

Copy link
Copy link
@BryanHunt

Description

@BryanHunt
Issue body actions

If you are building an ESM module and you use the import format:

import { OpenAPIObject } from "openapi3-ts/src/model/openapi31";

and use mocha with:

{
  "loader": "ts-node/esm"
}

unit tests will fail.

The "fix" is to use the import format:

import { oas31 } from "openapi3-ts";

Since the second format works, I don't expect any code change here. I'm mainly creating this issue in case others run into the same problem.

It might be good to update the readme to note this.

pjmolina and koooge

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.