Skip to content

Commit

Permalink
refactor: test precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
hassanad94 committed May 24, 2024
1 parent 096e7aa commit ef5b90e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
16 changes: 10 additions & 6 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
if [[ "$OSTYPE" == "linux-gnu"* || "$OSTYPE" == "darwin"* ]] &&!("$PSVersionTable.PSVersion.Major" -ge 5); then
# Unix-like OS detected, proceed with redirection
exec >/dev/tty 2>&1
elif $PSVersionTable.PSVersion.Major -lt 5; then
# PowerShell version less than 5, assume Unix-like environment
exec >/dev/tty 2>&1

# Detect /dev/tty using readlink and fd/2
tty=$(readlink /proc/$$/fd/2)

# Use the detected tty for redirection
if [[ -n "$tty" ]]; then
exec >"$tty" 2>&1
else
echo "Could not detect /dev/tty"
fi

yarn lint-staged
1 change: 0 additions & 1 deletion packages/sn-editor-react/test/link-control.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { createExtensions } from '../src/extension-list'

jest.mock('react-monaco-editor', () =>
jest.fn((props) => {
console.log(props)
return (
<div data-test="mock-monaco-editor" onChange={props.fieldOnChange} ref={props.editorRef}>
{props.value}
Expand Down

0 comments on commit ef5b90e

Please sign in to comment.