File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 30
30
"transpile:jsx" : " microbundle src/jsx.js -o dist/jsx.js --target web --external preact && microbundle dist/jsx.js -o dist/jsx.js -f cjs --external preact" ,
31
31
"copy-typescript-definition" : " copyfiles -f src/*.d.ts dist" ,
32
32
"test" : " eslint src test && tsc && npm run test:mocha && npm run bench" ,
33
- "test:mocha" : " BABEL_ENV=test mocha -r @babel/register -r test/setup.js test/**/*.test.js" ,
33
+ "test:mocha" : " BABEL_ENV=test mocha -r @babel/register -r test/setup.js test/**/[!compat]*.test.js && npm run test:mocha:compat" ,
34
+ "test:mocha:compat" : " BABEL_ENV=test mocha -r @babel/register -r test/setup.js test/compat.test.js" ,
34
35
"format" : " prettier src/**/*.{d.ts,js} test/**/*.js --write" ,
35
36
"prepublishOnly" : " npm run build" ,
36
37
"release" : " npm run build && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
Original file line number Diff line number Diff line change
1
+ import { render } from '../src' ;
2
+ import { createElement } from 'preact/compat' ;
3
+ import { expect } from 'chai' ;
4
+
5
+ describe ( 'compat' , ( ) => {
6
+ it ( 'should not duplicate class attribute when className is empty' , async ( ) => {
7
+ let rendered = render ( createElement ( 'div' , { className : '' } ) ) ;
8
+ let expected = `<div class></div>` ;
9
+
10
+ expect ( rendered ) . to . equal ( expected ) ;
11
+ } ) ;
12
+ } ) ;
You can’t perform that action at this time.
0 commit comments