mirror of
https://github.com/tenrok/BBob.git
synced 2026-06-14 18:42:24 +03:00
feat: update core deps (#120)
* feat: use swc.rs instead of babel * BREAKING CHANGE: now we use swc.rs as main bundler and transpiler instead of babel - jest now uses swc - rollup now uses swc * feat: benchmark now separate package with `npm start` and colored output - benchmark as separate package with error throw if package drops performance * feat: all lerna packages now using scripts/pkg-task * feat(github): publish to npm and github registry - when release was created this action automaticly publish packages to npm and github * feat(github): move all from Travis CI to Github Actions - code analysis and tests now using github actions * test: increase tests coverage - add more tests for @bbob/react, @bbob/vue2 and @bbob/parser
This commit is contained in:
committed by
GitHub
parent
86d1dde106
commit
da6709d437
@@ -1 +0,0 @@
|
||||
module.exports = require('../../babel.config');
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = require('../../jest.config');
|
||||
Generated
+977
-805
File diff suppressed because it is too large
Load Diff
@@ -41,15 +41,15 @@
|
||||
"url": "git://github.com/JiLiZART/bbob.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build:commonjs": "../../node_modules/.bin/cross-env BABEL_ENV=commonjs NODE_ENV=production ../../node_modules/.bin/babel src --out-dir lib",
|
||||
"build:es": "../../node_modules/.bin/cross-env BABEL_ENV=es NODE_ENV=production ../../node_modules/.bin/babel src --out-dir es",
|
||||
"build:umd": "../../node_modules/.bin/cross-env BABEL_ENV=rollup ../../node_modules/.bin/rollup --config ../../rollup.config.js",
|
||||
"build:commonjs": "../../scripts/pkg-task build-commonjs",
|
||||
"build:es": "../../scripts/pkg-task build-es",
|
||||
"build:umd": "../../scripts/pkg-task build-umd",
|
||||
"build": "npm run build:commonjs && npm run build:es && npm run build:umd",
|
||||
"test": "../../node_modules/.bin/jest --",
|
||||
"cover": "../../node_modules/.bin/jest --coverage",
|
||||
"lint": "../../node_modules/.bin/eslint .",
|
||||
"size": "../../node_modules/.bin/cross-env NODE_ENV=production ../../node_modules/.bin/size-limit",
|
||||
"bundlesize": "../../node_modules/.bin/cross-env NODE_ENV=production ../../node_modules/.bin/bundlesize"
|
||||
"test": "../../scripts/pkg-task test",
|
||||
"cover": "../../scripts/pkg-task cover",
|
||||
"lint": "../../scripts/pkg-task lint",
|
||||
"size": "../../scripts/pkg-task size",
|
||||
"bundlesize": "../../scripts/pkg-task bundlesize"
|
||||
},
|
||||
"size-limit": [
|
||||
{
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import React from 'react';
|
||||
import preset from '@bbob/preset-react';
|
||||
|
||||
import { shallow } from 'enzyme';
|
||||
import Enzyme from 'enzyme';
|
||||
import Enzyme, { shallow } from 'enzyme';
|
||||
import Adapter from 'enzyme-adapter-react-15';
|
||||
|
||||
import BBCode from '../src';
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import React from 'react'
|
||||
import { render } from "../src";
|
||||
|
||||
describe('@bbob/react render', () => {
|
||||
test('render simple b tag', () => {
|
||||
const html = render('[b]boldedtext[/b]');
|
||||
|
||||
expect(html[0].type).toStrictEqual('b')
|
||||
})
|
||||
test('render self closed b tag', () => {
|
||||
const html = render('[b][/b]');
|
||||
|
||||
expect(html[0].type).toBe('b')
|
||||
})
|
||||
test('render simple text nodes', () => {
|
||||
const html = render('some example words');
|
||||
|
||||
expect(html[0]).toStrictEqual("some")
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user