Ai
1 Star 0 Fork 35

匡胜昆/G2Plot

forked from antv/G2Plot 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
lab-spec.ts 751 Bytes
一键复制 编辑 原始数据 按行查看 历史
visiky 提交于 2021-01-20 22:13 +08:00 . feat: 多图层图表正式开放 (#2245)
import { Lab, notice, Stage } from '../../src/lab';
describe('lab', () => {
it('lab', () => {
expect(Lab).toBeDefined();
expect(Lab.MultiView).toBeDefined();
});
it('notice', () => {
const fn = jest.fn();
window.console.warn = fn;
notice(Stage.DEV, 'Test');
expect(fn).toBeCalledWith(`Plot 'Test' is in DEV stage, just give us issues.`);
notice(Stage.BETA, 'X');
expect(fn).toBeCalledWith(`Plot 'X' is in BETA stage, DO NOT use it in production env.`);
notice(Stage.STABLE, 'Y');
expect(fn).toBeCalledWith(`Plot 'Y' is in STABLE stage, import it by "import { Y } from '@antv/g2plot'".`);
// @ts-ignore
notice('NO-STAGE', 'Y');
expect(fn).toBeCalledWith(`invalid Stage type.`);
});
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/17311824/g2plot.git
git@gitee.com:17311824/g2plot.git
17311824
g2plot
G2Plot
master

搜索帮助