import { checkFilesExist , ensureNxProject , readJson , runNxCommandAsync , uniq } from "@nrwl/nx-plugin/testing" ; describe ( "gcp-function e2e" , ( ) => { const pluginHttp = "http-service" ; it ( "Generate function" , async ( done ) => { ensureNxProject ( "@joelcode/gcp-function" , "dist/libs/gcp-function" ) ; await runNxCommandAsync ( `generate @joelcode/gcp-function:http ${ pluginHttp }` ) ; done ( ) ; } , 60000 ) ; it ( "build function" , async ( done ) => { ensureNxProject ( "@joelcode/gcp-function" , "dist/libs/gcp-function" ) ; await runNxCommandAsync ( `build ${ pluginHttp }` ) ; done ( ) ; } , 60000 ) ; describe . skip ( "--tags" , ( ) => { it . skip ( "old" , async ( done ) => { const pluginHttp = "http-service" ; const pluginPubsub = "pubsub-service" ; ensureNxProject ( "@joelcode/gcp-function" , "dist/libs/gcp-function" ) ; await runNxCommandAsync ( `generate @joelcode/gcp-function:http ${ pluginHttp }` ) ; done ( ) ; } , 60000 ) ; it ( "should add tags to nx.json" , async ( done ) => { const plugin = uniq ( "gcp-function" ) ; ensureNxProject ( "@joelcode/gcp-function" , "dist/libs/gcp-function" ) ; await runNxCommandAsync ( `generate @joelcode/gcp-function:gcpFunction ${ plugin } --tags e2etag,e2ePackage` ) ; const nxJson = readJson ( "nx.json" ) ; expect ( nxJson . projects [ plugin ] . tags ) . toEqual ( [ "e2etag" , "e2ePackage" ] ) ; done ( ) ; } ) ; } ) ; } ) ;