Closed marklai1998 closed 3 months ago
Can you add an example file here, it should work for both?
test.spec.js
const { expect } = require("chai");
const sinon = require("sinon");
const featureFlagSdk = require("./file");
describe("test", () => {
describe("createCustomIcon", () => {
before(() => {
sinon.stub(featureFlagSdk, "evaluate").resolves(true);
});
it("should get file url and create icon for zeus", async () => {
expect(true).to.be.deep.equal(true);
});
});
});
My settings:
? Which parser do you want to use? Babel
? Which test library would you like to migrate from? Sinon
? Are you using the global object for assertions (i.e. without requiring them) Yes, and I'm not afraid of false positive transformations
? Will you be using Jest on Node.js as your test runner? Yes, use the globals provided by Jest (recommended)
Thanks! Would you be up for fixing this? I hope it should be pretty straightforward as the other transformers handles this correctly (I believe).
I suggest adding a test case in https://github.com/skovhus/jest-codemods/blob/main/src/transformers/sinon.test.ts and take it from there.
Thanks! Would you be up for fixing this? I hope it should be pretty straightforward as the other transformers handles this correctly (I believe).
I suggest adding a test case in https://github.com/skovhus/jest-codemods/blob/main/src/transformers/sinon.test.ts and take it from there.
just tried for a while, I don't think I'm able to do it, most of the type def is gone and I don't have the knowledge foundation jscodeshift
Hello, I'm trying to use this tool to transform existing Sinon code to Jest But the transformer skips every file I throw at it.
I see the test case for Sinon transformer is using ESM while all other is Cjs Its nice to support ESM, but cjs should be the majority of the user here