Skip to content

Commit b45e819

Browse files
committed
test(web): resolve the Discussion CSS guard path from the test file
The guard read the component through process.cwd(), which is the repo root under the sharded root test run, so the file was missing in CI. Resolve it from import.meta.dirname like the neighbouring panel test.
1 parent 3b3aaed commit b45e819

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/pythinker-web/test/expert-opinion-session.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { readFileSync } from 'node:fs';
2-
import { resolve } from 'node:path';
2+
import { join } from 'node:path';
33

44
import { mount } from '@vue/test-utils';
55
import { defineComponent } from 'vue';
@@ -250,7 +250,7 @@ describe('Expert Talk session transcript', () => {
250250

251251
describe('Expert Talk exchange scrolling', () => {
252252
it('lets a wheel over a reasoning box chain to the transcript scroller', () => {
253-
const source = readFileSync(resolve(process.cwd(), 'src/components/chat/ExpertTalkExchange.vue'), 'utf8');
253+
const source = readFileSync(join(import.meta.dirname, '../src/components/chat/ExpertTalkExchange.vue'), 'utf8');
254254
const thinkingRule = source.slice(source.indexOf('.expert-talk__thinking {'));
255255
const block = thinkingRule.slice(0, thinkingRule.indexOf('}'));
256256
expect(block).toContain('overflow: auto');

0 commit comments

Comments
 (0)