New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure browserslist extends works properly #33890
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { createNext } from 'e2e-utils' | ||
import { NextInstance } from 'test/lib/next-modes/base' | ||
import { renderViaHTTP } from 'next-test-utils' | ||
|
||
describe('browserslist-extends', () => { | ||
let next: NextInstance | ||
|
||
beforeAll(async () => { | ||
next = await createNext({ | ||
files: { | ||
'pages/index.js': ` | ||
import styles from './index.module.css' | ||
|
||
export default function Page() { | ||
return <p className={styles.hello}>hello world</p> | ||
} | ||
`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there anything specifix to this code that browser list is interacting with? Or is it more of a hello world? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mainly just a hello world, it failed from just reading the |
||
'pages/index.module.css': ` | ||
.hello { | ||
color: pink; | ||
} | ||
`, | ||
}, | ||
dependencies: { | ||
'browserslist-config-google': '^3.0.1', | ||
}, | ||
packageJson: { | ||
browserslist: ['extends browserslist-config-google'], | ||
}, | ||
}) | ||
}) | ||
afterAll(() => next.destroy()) | ||
|
||
it('should work', async () => { | ||
const html = await renderViaHTTP(next.url, '/') | ||
expect(html).toContain('hello world') | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to add some comments for why replacing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in cbdb13b