Open SukkaW opened 1 year ago
Seems that CI failed due to test coverage. Let me see what I can do.
Update
The test coverage reaches 100% and the CI is passed.
The mutation testing report(available at the action run page) shows that more tests are needed for negative situations, i.e. code that shouldn't be processed.
Examples of situations that may need to be tested:
const style9 = require(style9);
let style9 = require('style9');
var style9 = require('style9');
const { create } = require('style9');
const style9 = foo.require('style9');
const create = require('style9').create;
const style9 = globalThis.require('style9');
require('style9')();
require('style9').create();
foo(require('style9'));
const style9 = require('style9', foo);
const style9 = require(style9); let style9 = require('style9'); var style9 = require('style9'); const { create } = require('style9'); const style9 = foo.require('style9'); const create = require('style9').create; const style9 = globalThis.require('style9'); require('style9')(); require('style9').create(); foo(require('style9')); const style9 = require('style9', foo);
Sure, I will add the cases.
Added in johanholmerin/style9@80e3f9c
(#89)
The mutation tests are still lacking some coverage. The cases above were only examples, they may not be exactly what is required. Check the test report and you should be able to see what's needed.
@SukkaW Is this PR still active?
I have been a bit busy recently. I will draft the PR for now.
Previously,
style9
only supportsimport xxx from 'style9'
. The PR adds support forconst xxx = require('style9')
.The unit test case is added in
__tests__/code/import.js
.