Skip to content
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

ReferenceError: _ff9‍ is not defined #158

Closed
mfolkeseth opened this issue Feb 12, 2019 · 2 comments
Closed

ReferenceError: _ff9‍ is not defined #158

mfolkeseth opened this issue Feb 12, 2019 · 2 comments

Comments

@mfolkeseth
Copy link

mfolkeseth commented Feb 12, 2019

I'm getting this cryptic error on code which have previously been working just fine. Without any research results I thought maybe you guys have any idea what might be going on.

When I call data.__set__('db', mock) i get the following error ReferenceError: _ff9‍ is not defined.
The related file resides in /node_modules/.cache/esm...
Some info from the stacktrace

    not ok test/data_test.js
    timeout: 30000
    file: test/data_test.js
    childId: 0
    command: /usr/local/bin/node
    args:
      - '-r'
      - /Users/me/project/node_modules/esm/esm.js
      - test/data_test.js
    stdio:
      - 0
      - pipe
      - 2
    cwd: /Users/me/project
    exitCode: 1

Source

const tap = require('tap')
const rewire = require('rewire')
const data = rewire('../server/data')

const mock = {
  getSeries: async () => {
    return {}
  }
}
data.__set__('db', mock)

EDIT: esm is a tap dependency
EDIT: Issue occurs for tap version 12.5.0 or newer

@jdalton
Copy link

jdalton commented Feb 15, 2019

👋 @mfolkeseth!

The esm loader maintainer here. This is not a rewire bug, it's an esm one.
I'll update tapjs/tapjs#509 with details.

Update:

v3.2.5 is released 🎉

@mfolkeseth
Copy link
Author

Thanks! 👋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants