This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| commit_hashes=$(git log --merges origin/$(git_main_branch)..${git_current_branch} --format="%H") | |
| for commit_hash in ${commit_hashes}; do | |
| files=$(git show ${commit_hash} --name-only --pretty=format: | sort | uniq | grep -E '\.(ts|tsx|js|jsx)$') | |
| for file in ${files}; do | |
| if [[ -e $file ]]; then | |
| echo "Processing ${file}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Some utils | |
| const _promise = <T>(value: T, ms: number): PromiseFunction<T> => | |
| () => new Promise<T>(resolve => setTimeout(resolve, ms, value)); | |
| const _addToqueue = <T>(queue: Queue<T>): AddToQueueFunction<T> => | |
| (value: T) => queue.enqueue(value); | |
| (async () => { | |
| const promise1 = _promise('[1] This takes 1s', 1000); | |
| const promise2 = _promise('[2] This takes 3s', 3000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set number | |
| set relativenumber | |
| set nowrap " lines do not wrap | |
| set mouse=a | |
| set numberwidth=1 | |
| set autoindent " intelligent autoindent when creating a new line | |
| set expandtab " force the use of spaces | |
| set shiftwidth=2 | |
| "set scrolloff=8 " always keep at least 8 lines above and below the cursor | |
| set clipboard+=unnamedplus " use system clipboard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const TicTacToe = require('./TicTacToe'); | |
| describe('Tic Tac Toe', () => { | |
| const player1 = {'color': '#000'}; | |
| const player2 = {'color': '#fff'}; | |
| let moves; | |
| test('should create a new board', () => { | |
| const board = TicTacToe.createBoard(); | |
| const expectedBoard = [ |