新增: - backend/venv/ - Python 虚拟环境 - backend/start.sh - 启动脚本(使用虚拟环境) - backend/requirements.txt - 依赖列表 - .gitignore - 忽略虚拟环境和缓存文件 说明: - 每个项目使用独立虚拟环境 - 避免依赖冲突 - 启动脚本自动创建和激活虚拟环境
25 lines
710 B
Markdown
25 lines
710 B
Markdown
# Suggest using `toStrictEqual()` (`prefer-strict-equal`)
|
|
|
|
`toStrictEqual` not only checks that two objects contain the same data but also
|
|
that they have the same structure. It is common to expect objects to not only
|
|
have identical values but also to have identical keys. A stricter equality will
|
|
catch cases where two objects do not have identical keys.
|
|
|
|
## Rule details
|
|
|
|
This rule triggers a warning if `toEqual()` is used to assert equality.
|
|
|
|
### Default configuration
|
|
|
|
The following pattern is considered warning:
|
|
|
|
```js
|
|
expect({ a: 'a', b: undefined }).toEqual({ a: 'a' }); // true
|
|
```
|
|
|
|
The following pattern is not warning:
|
|
|
|
```js
|
|
expect({ a: 'a', b: undefined }).toStrictEqual({ a: 'a' }); // false
|
|
```
|