Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

742 B
Raw Blame
import { describe, expect, it } from 'vitest'
import { appendBuildOldSpaceOption, getBuildOldSpaceSizeMb } from './node-old-space-limit.mjs'

const gib = 1024 * 1024 * 1024

describe('node old-space build limit', () => {
  it('caps larger hosts at the release-runner build heap', () => {
    expect(getBuildOldSpaceSizeMb(8 * gib)).toBe(4096)
  })

  it('reserves memory for smaller arm64 hosts', () => {
    expect(getBuildOldSpaceSizeMb(4 * gib)).toBe(3072)
  })

  it('keeps existing NODE_OPTIONS while appending the build heap limit last', () => {
    expect(appendBuildOldSpaceOption('--trace-warnings --max-old-space-size=8192', 4 * gib)).toBe(
      '--trace-warnings --max-old-space-size=8192 --max-old-space-size=3072'
    )
  })
})