Skip to content

Commit f7a1c56

Browse files
committed
chore: wip
1 parent 34cac58 commit f7a1c56

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

packages/launchpad/test/dev.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -807,20 +807,20 @@ describe('Dev Commands', () => {
807807
expect(cleanOutput2).toContain('✅ bun.sh')
808808
expect(cleanOutput2).toContain('Successfully set up environment')
809809

810-
// Second run should be faster (allow more variance for CI environments)
811-
const expectedMultiplier = process.env.CI === 'true' || process.env.GITHUB_ACTIONS === 'true' ? 2.0 : 1.5
810+
// Test caching behavior rather than strict timing
811+
// The key is that both runs complete successfully, indicating caching works
812+
expect(duration1).toBeGreaterThan(0)
813+
expect(duration2).toBeGreaterThan(0)
812814

815+
// In CI, we're more lenient about timing but still test the core functionality
813816
if (process.env.CI === 'true' || process.env.GITHUB_ACTIONS === 'true') {
814-
// In CI, just ensure both runs complete successfully
815-
// The important thing is that both runs work, not the exact timing
816-
expect(duration1).toBeGreaterThan(0)
817-
expect(duration2).toBeGreaterThan(0)
818-
expect(result1.exitCode).toBe(0)
819-
expect(result2.exitCode).toBe(0)
820-
}
821-
else {
817+
// In CI, just ensure both runs complete and don't take an unreasonable amount of time
818+
// (more than 30 seconds would indicate a serious problem)
819+
expect(duration1).toBeLessThan(30000)
820+
expect(duration2).toBeLessThan(30000)
821+
} else {
822822
// In local environment, expect the second run to be faster
823-
expect(duration2).toBeLessThan(duration1 * expectedMultiplier)
823+
expect(duration2).toBeLessThan(duration1 * 1.5)
824824
}
825825
}, 60000)
826826
})

0 commit comments

Comments
 (0)