jest

    1热度

    2回答

    我有使用Jest with Enzyme进行打字稿测试。测试工作完美,但是当我添加一个组件,它给了我一个Unterminated regular expression错误 import {} from 'jasmine'; import {shallow} from 'enzyme'; import {Show, Hide} from '../components/show_hide';

    0热度

    1回答

    使用JestClient特定的Fileds我已经存储在 {"Book_Id" : "102" ,"Book_Name" : "Alice in wonderLand", "Review_Text" :"DescentRead","Rating_Percentage" :"100" }' {"Book_Id" : "102" ,"Book_Name" : "Alice in wonderLand"

    1热度

    1回答

    在使用ts-jest运行我的测试时出现“意外令牌”错误。 我已经成立了一个最小的回购与我的当前设置的位置: https://github.com/ramoneguru/ts-jest-setup 的preprocessor.js是罚款和工作。然而,我回购中的Loading组件似乎是问题所在。我的设置是否正常?我在某处错过了一个明显的配置吗?

    0热度

    1回答

    我在阵营 - 终极版 export class IncrementalSearch extends React.Component { constructor(props) { super(props); this.onSearch$ = new Subject(); this.onChange = this.onChange.bind(this); } c

    1热度

    1回答

    我有一个任务来测试React组件,它依赖于BrowserRouter组件,它位于上层的某处。据我所知BrowserRouter传递路由对象到任何孩子,孙子等道具 组件: import React, { Component } from 'react'; import Program from './Program'; export default class Programs extends

    1热度

    1回答

    我有一个简单的浅度测试。 import React from 'react'; import { shallow } from 'enzyme'; import Layout from '../containers/' it('renders without crashing',() => { shallow(<Layout />); }); 在添加firebase.sto

    4热度

    1回答

    有没有办法用[email protected]来测试匿名函数的相等性? 我试图通过类似的测试: const foo = i => j => {return i*j} const bar =() => {baz:foo(2), boz:1} describe('Test anonymous function equality',()=>{ it('+++ foo',() => {

    2热度

    1回答

    我有一个含模态对话框的React组件(使用reactstrap构建,但其他人已报告与react-bootstrap和其他类型的模块组件相似的问题)。酶无法找到模态内的任何组件,即使它们在实际应用程序中呈现良好。小例子: import React from 'react' import { Modal } from 'reactstrap' export default class MyMod

    0热度

    1回答

    好了,所以我已经得到了很远的创建做出反应组件的ChartJS,但测试时我得到以下错误: FAIL lib\chart\chart.test.tsx ● renders without crashing TypeError: Cannot read property 'length' of null at Object.acquireContext (node_m

    1热度

    1回答

    创建使用 (https://github.com/Microsoft/TypeScript-React-Starter) NPM安装-g创建反应的应用程序内 CREATE-反应-App我-app的应用程序中使用的打字稿应用程序 - 脚本版本=反应的脚本-TS 我已经通过了一些文章了,似乎在圈子里被绕来绕去,但还没有找到我怎么能调试默认app.test.tsx 节点在版本7.9.0 0上其他一切应该