Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

553 B
Raw Blame
import { describe, expect, it } from 'vitest'
import { isRecord } from './is-record'

describe('isRecord', () => {
  it('accepts plain objects, including empty and null-prototype ones', () => {
    expect(isRecord({})).toBe(true)
    expect(isRecord({ a: 1 })).toBe(true)
    expect(isRecord(Object.create(null))).toBe(true)
  })

  it('rejects null, arrays and primitives', () => {
    for (const value of [null, undefined, [], [1], 0, 1, '', 'x', true, false, Symbol('s'), 1n]) {
      expect(isRecord(value), String(value)).toBe(false)
    }
  })
})