mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-17 04:20:36 +03:00
update puppeteer jest setup
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
<div id="a"></div>
|
||||
<div id="b"></div>
|
||||
<div id="c"></div>
|
||||
<div id="d"></div>
|
||||
@@ -1,9 +1,15 @@
|
||||
describe('Google', () => {
|
||||
import html from './build/build.html';
|
||||
|
||||
describe('Environment', () => {
|
||||
beforeAll(async () => {
|
||||
await page.goto('https://google.com');
|
||||
await page.setContent(html, { waitUntil: 'domcontentloaded' });
|
||||
});
|
||||
|
||||
it('should be titled "Google"', async () => {
|
||||
await expect(page.title()).resolves.toMatch('Google');
|
||||
it('should be titled "Environment"', async () => {
|
||||
await expect(page).toMatchElement('#a');
|
||||
await expect(page).toMatchElement('#b');
|
||||
await expect(page).toMatchElement('#c');
|
||||
await expect(page).toMatchElement('#d');
|
||||
await expect(page.title()).resolves.toMatch('Environment');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { Environment } from 'environment';
|
||||
import 'some.scss';
|
||||
import 'some.css';
|
||||
|
||||
// eslint-disable-next-line
|
||||
console.log(new Environment());
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
declare module '*.css' {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module '*.scss' {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module '*.html' {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
body {
|
||||
background: blue;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
$c: red;
|
||||
|
||||
body {
|
||||
background: $c;
|
||||
}
|
||||
Reference in New Issue
Block a user