{"size": 562, "ext": "js", "max_stars_repo_path": "src/593-valid-square/test.js", "max_stars_repo_name": "tangweikun/leetcode", "max_stars_repo_stars_event_min_datetime": "2018-01-30T01:22:48.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-03T20:41:54.000Z", "max_issues_repo_path": "src/593-valid-square/test.js", "max_issues_repo_name": "tangweikun/long-claw", "max_issues_repo_issues_event_min_datetime": "2017-11-08T14:09:16.000Z", "max_issues_repo_issues_event_max_datetime": "2017-12-21T11:51:58.000Z", "max_forks_repo_path": "src/593-valid-square/test.js", "max_forks_repo_name": "tangweikun/leetcode", "max_forks_repo_forks_event_min_datetime": "2018-05-31T16:09:21.000Z", "max_forks_repo_forks_event_max_datetime": "2020-07-12T20:34:20.000Z"}
{"max_stars_count": 174, "max_issues_count": 3, "max_forks_count": 9, "avg_line_length": 23.4166666667, "max_line_length": 72, "alphanum_fraction": 0.5195729537}
import { validSquare } from '.'

test('validSquare-1', () => {
  expect(validSquare([0, 0], [1, 1], [1, 0], [0, 1])).toBe(true)
})

test('validSquare-2', () => {
  expect(validSquare([2, 2], [2, 4], [4, 2], [4, 4])).toBe(true)
})

test('validSquare-3', () => {
  expect(validSquare([2, 2], [2, 4], [5, 2], [5, 4])).toBe(false)
})

test('validSquare-4', () => {
  expect(validSquare([0, 0], [0, 0], [0, 0], [0, 0])).toBe(false)
})

test('validSquare-5', () => {
  expect(
    validSquare([4604, 1524], [4574, 2274], [5354, 1554], [5324, 2304]),
  ).toBe(true)
})
