@@ -18,6 +18,8 @@ it("can bundle a simple project", async () => {
1818 const indexDtsFilePath = path . resolve ( baseDistPath , "typings" , "index.d.ts" ) ;
1919 const indexMjsFilePath = path . resolve ( baseDistPath , "esm" , "index.js" ) ;
2020 const packageJsonFilePath = path . resolve ( baseDistPath , "package.json" ) ;
21+ const readmeFilePath = path . resolve ( baseDistPath , "README.md" ) ;
22+ const fooFilePath = path . resolve ( baseDistPath , "foo.json" ) ;
2123
2224 expect ( fse . readFileSync ( indexJsFilePath , "utf8" ) ) . toMatchInlineSnapshot ( `
2325 "\\"use strict\\";
@@ -34,6 +36,14 @@ it("can bundle a simple project", async () => {
3436 "export var someNumber = 1;
3537 "
3638 ` ) ;
39+ expect ( fse . readFileSync ( readmeFilePath , "utf8" ) ) . toMatchInlineSnapshot ( `
40+ "Hello!
41+ "
42+ ` ) ;
43+ expect ( fse . readFileSync ( fooFilePath , "utf8" ) ) . toMatchInlineSnapshot ( `
44+ "{ \\"hi\\": 1 }
45+ "
46+ ` ) ;
3747 expect ( fse . readFileSync ( packageJsonFilePath , "utf8" ) ) . toMatchInlineSnapshot ( `
3848 "{
3949 \\"name\\": \\"simple\\",
@@ -77,6 +87,9 @@ it("can bundle a simple project", async () => {
7787 }
7888 }"
7989 ` ) ;
90+ await execa ( "node" , [ binaryFolder , "check" ] , {
91+ cwd : path . resolve ( fixturesFolder , "simple" )
92+ } ) ;
8093} ) ;
8194
8295it ( "can build a monorepo project" , async ( ) => {
@@ -275,4 +288,8 @@ it("can build a monorepo project", async () => {
275288 }
276289 }"
277290 ` ) ;
291+
292+ await execa ( "node" , [ binaryFolder , "check" ] , {
293+ cwd : path . resolve ( fixturesFolder , "simple-monorepo" )
294+ } ) ;
278295} ) ;
0 commit comments