Skip to content

Instantly share code, notes, and snippets.

View skypesky's full-sized avatar
🌏

JianChao Ye skypesky

🌏
View GitHub Profile

Ubuntu && MacOS 之间如何复制文件

scp ~/local-folder [email protected]:~/remote-folder

Ubuntu

sudo apt-get install zsh 
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# sudo apt -y install ubuntu-desktop task-gnome-desktop
# sudo reboot
@skypesky
skypesky / all-mock.spec.js.md
Last active July 19, 2023 11:34
mock 写法大全

How to mock deeply nested objects?

const states = require('states');

jest.mock('states', () => ({ auditLog: { find: jest.fn(() => []) } }));

expect(states.auditLog.find).toBeCalled();