Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
e45411e9
Unverified
Commit
e45411e9
authored
Mar 03, 2025
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Mar 03, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix flaky Bun test (#76763)
parent
09403207
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
bun.test.ts
test/integration/create-next-app/package-manager/bun.test.ts
+9
-3
No files found.
test/integration/create-next-app/package-manager/bun.test.ts
View file @
e45411e9
import
execa
from
'execa'
import
*
as
semver
from
'semver'
import
{
import
{
command
,
command
,
DEFAULT_FILES
,
DEFAULT_FILES
,
...
@@ -7,11 +9,9 @@ import {
...
@@ -7,11 +9,9 @@ import {
useTempDir
,
useTempDir
,
}
from
'../utils'
}
from
'../utils'
const
lockFile
=
'bun.lockb'
const
files
=
[...
DEFAULT_FILES
,
lockFile
]
describe
(
'create-next-app with package manager bun'
,
()
=>
{
describe
(
'create-next-app with package manager bun'
,
()
=>
{
let
nextTgzFilename
:
string
let
nextTgzFilename
:
string
let
files
:
string
[]
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
if
(
!
process
.
env
.
NEXT_TEST_PKG_PATHS
)
{
if
(
!
process
.
env
.
NEXT_TEST_PKG_PATHS
)
{
...
@@ -27,6 +27,12 @@ describe('create-next-app with package manager bun', () => {
...
@@ -27,6 +27,12 @@ describe('create-next-app with package manager bun', () => {
await
command
(
'bun'
,
[
'--version'
])
await
command
(
'bun'
,
[
'--version'
])
// install bun if not available
// install bun if not available
.
catch
(()
=>
command
(
'npm'
,
[
'i'
,
'-g'
,
'bun'
]))
.
catch
(()
=>
command
(
'npm'
,
[
'i'
,
'-g'
,
'bun'
]))
const
bunVersion
=
(
await
execa
(
'bun'
,
[
'--version'
])).
stdout
.
trim
()
// Some CI runners pre-install Bun.
// Locally, we don't pin Bun either.
const
lockFile
=
semver
.
gte
(
bunVersion
,
'1.2.0'
)
?
'bun.lock'
:
'bun.lockb'
files
=
[...
DEFAULT_FILES
,
lockFile
]
})
})
it
(
'should use bun for --use-bun flag'
,
async
()
=>
{
it
(
'should use bun for --use-bun flag'
,
async
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment