-
Notifications
You must be signed in to change notification settings - Fork 27
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
feat: support require('style9')
#89
base: master
Are you sure you want to change the base?
Conversation
bb52531
to
9964d49
Compare
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); |
Sure, I will add the cases. Added in johanholmerin/style9@ |
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 for
const xxx = require('style9')
.The unit test case is added in
__tests__/code/import.js
.