0

I just write a JS like this.

modules.export = {
  add(a, b){
    return a + b;
  },
}

it is quite simple and click Suggest a new test.

describe('test add', function() {
    it('test add.exports', function(done) {
        assert.equal(add.exports(1, 2), 3);
        done();
    })
})

I get this then Run this test.

RESULT
Could not find enclosing package.

I just joined subscription to github copilot, installed required library(like chai, mocha)

The error message is too simple so I googled this and try to find solution, I couldn't.

I want to know what the error message means. I wonder "package 'main'" like golang at the top but this is JS.

Please give me a chance to continue using copilot labs.

Thankyou.

gattoman
  • 33
  • 1
  • 7

0 Answers0