|
1 | 1 | // Test default next-on-netlify configuration |
2 | 2 |
|
3 | | -const { parse, join } = require("path"); |
| 3 | +const { parse, join, sep } = require("path"); |
4 | 4 | const { |
5 | 5 | existsSync, |
6 | 6 | readdirSync, |
@@ -44,28 +44,32 @@ describe("next-on-netlify", () => { |
44 | 44 | describe("next-on-netlify", () => { |
45 | 45 | test("builds successfully", () => { |
46 | 46 | expect(buildOutput).toMatch("Next on Netlify"); |
47 | | - expect(buildOutput).toMatch("Copying public/ folder to out_publish/"); |
48 | | - expect(buildOutput).toMatch("Copying static NextJS assets to out_publish/"); |
49 | 47 | expect(buildOutput).toMatch( |
50 | | - "Setting up API endpoints as Netlify Functions in out_functions/" |
| 48 | + `Copying public${sep} folder to out_publish${sep}` |
51 | 49 | ); |
52 | 50 | expect(buildOutput).toMatch( |
53 | | - "Setting up pages with getInitialProps as Netlify Functions in out_functions/" |
| 51 | + `Copying static NextJS assets to out_publish${sep}` |
54 | 52 | ); |
55 | 53 | expect(buildOutput).toMatch( |
56 | | - "Setting up pages with getServerSideProps as Netlify Functions in out_functions/" |
| 54 | + `Setting up API endpoints as Netlify Functions in out_functions${sep}` |
57 | 55 | ); |
58 | 56 | expect(buildOutput).toMatch( |
59 | | - "Copying pre-rendered pages with getStaticProps and JSON data to out_publish/" |
| 57 | + `Setting up pages with getInitialProps as Netlify Functions in out_functions${sep}` |
60 | 58 | ); |
61 | 59 | expect(buildOutput).toMatch( |
62 | | - "Setting up pages with getStaticProps and fallback: true as Netlify Functions in out_functions/" |
| 60 | + `Setting up pages with getServerSideProps as Netlify Functions in out_functions${sep}` |
63 | 61 | ); |
64 | 62 | expect(buildOutput).toMatch( |
65 | | - "Setting up pages with getStaticProps and revalidation interval as Netlify Functions in out_functions/" |
| 63 | + `Copying pre-rendered pages with getStaticProps and JSON data to out_publish${sep}` |
66 | 64 | ); |
67 | 65 | expect(buildOutput).toMatch( |
68 | | - "Copying pre-rendered pages without props to out_publish/" |
| 66 | + `Setting up pages with getStaticProps and fallback: true as Netlify Functions in out_functions${sep}` |
| 67 | + ); |
| 68 | + expect(buildOutput).toMatch( |
| 69 | + `Setting up pages with getStaticProps and revalidation interval as Netlify Functions in out_functions${sep}` |
| 70 | + ); |
| 71 | + expect(buildOutput).toMatch( |
| 72 | + `Copying pre-rendered pages without props to out_publish${sep}` |
69 | 73 | ); |
70 | 74 | expect(buildOutput).toMatch("Setting up redirects"); |
71 | 75 | expect(buildOutput).toMatch("Success! All done!"); |
|
0 commit comments