自带功能, 需要配置
"files.trimTrailingWhitespace": true
const mock = jest.fn(); | |
mock.mockReturnValue(42); | |
mock(); // 42 | |
mock.mockReturnValue(43); | |
mock(); // 43 | |
// 或者 | |
const myMockFn = jest | |
.fn() | |
.mockReturnValue('default') |
// step1: 使用 jest.mock | |
import {navigationEnabled, guidanceEnabled} from '../../../magic/index' | |
jest.mock('../../../magic/index', () => ({ | |
navigationEnabled: jest.fn(), | |
guidanceEnabled: jest.fn() | |
})); | |
// step2: 使用 mockImplementationi | |
navigationEnabled.mockImplementation(()=> true) |
自带功能, 需要配置
"files.trimTrailingWhitespace": true
set fileencodings=utf-8,euc-jp
前端代码也可以使用 MVC
service -> model -> component
写 model 层是脑力劳动,而写 component 层是体力劳动。
CSS 布局: http://zh.learnlayout.com/toc.html
CSS flex: http://zh.learnlayout.com/flexbox.html
CSS Grid: https://mubu.com/doc/y0zTk0ggQ0
https://ant.design/docs/react/contributing-cn
基于发布周期,每个月都会从master 分支切一个feature 分支出来(比如 features-3.1 分支用来发布 3.1 版本)。