/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/css/cjs-module-syntax/index.js
11 строк
539 B
Alexander Akait
feat: improve localIdentName hashing
26 ноя 2025, 14:08
Не верифицирован
26 ноя 2025, 14:08
1b5084e
Код
Авторство
О чём код?
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } it("should able to require the css module as commonjs", () => { const style = require("./style.module.css"); const interoperatedStyle = _interopRequireDefault(require("./style.module.css")); expect(style).toEqual({ foo: 'style_module_css-foo' }); expect(style).not.toEqual(nsObj({ foo: 'style_module_css-foo' })); expect(style.__esModule).toEqual(undefined); expect(interoperatedStyle.default.foo).toEqual("style_module_css-foo"); });