test(tui): pin footer-assertion cwd to a fixed path
The two transcript tests that assert footer token counters inherited process.cwd() as the session cwd. In a checkout deep enough that the footer label exceeds the 88-column fake terminal, the counters never render and the assertions fail. Pin those tests to a short fixed cwd; cwd rendering keeps its dedicated variants test.
This commit is contained in:
@@ -147,6 +147,10 @@ describe('TUI config', () => {
|
|||||||
describe('pi-tui chat lifecycle and transcript', () => {
|
describe('pi-tui chat lifecycle and transcript', () => {
|
||||||
it('renders its header, footer, replay, streaming answer, todos, and status', async () => {
|
it('renders its header, footer, replay, streaming answer, todos, and status', async () => {
|
||||||
const result = await setup({
|
const result = await setup({
|
||||||
|
// A fixed short cwd keeps the footer's token counters inside the 88-column
|
||||||
|
// fake terminal regardless of where the checkout lives; cwd rendering has
|
||||||
|
// its own dedicated variants test below.
|
||||||
|
cwd: '/workspace',
|
||||||
beforeMount(session) {
|
beforeMount(session) {
|
||||||
appendUser(session, 'restored prompt')
|
appendUser(session, 'restored prompt')
|
||||||
appendAssistant(session, [
|
appendAssistant(session, [
|
||||||
@@ -278,6 +282,7 @@ describe('pi-tui chat lifecycle and transcript', () => {
|
|||||||
|
|
||||||
it('renders the ANSI palette and every markdown/content style', async () => {
|
it('renders the ANSI palette and every markdown/content style', async () => {
|
||||||
const result = await setup({
|
const result = await setup({
|
||||||
|
cwd: '/workspace',
|
||||||
config: { color: true },
|
config: { color: true },
|
||||||
beforeMount(session) {
|
beforeMount(session) {
|
||||||
session.append('user/message', {
|
session.append('user/message', {
|
||||||
|
|||||||
Reference in New Issue
Block a user