Skip to content

Commit

Permalink
test: fix e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
dianjuar committed Sep 1, 2023
1 parent 6a17e29 commit f245f6f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 3 additions & 1 deletion e2e/ngx-deploy-npm-e2e/integration/react-native.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ describe('React Native', () => {
});

// Install the project
installNgxDeployNPMProject();
installNgxDeployNPMProject(
`--project="${uniqLibName}" --distFolderPath="dist/libs/${uniqLibName}"`
);

it('should publish the lib', () => {
expect(() => {
Expand Down
4 changes: 3 additions & 1 deletion e2e/ngx-deploy-npm-e2e/tests/build.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ describe('build', () => {
generateLib(nxPlugin, publishableLib);

// Install the project
installNgxDeployNPMProject();
installNgxDeployNPMProject(
`--project="${publishableLib}" --distFolderPath="dist/libs/${publishableLib}"`
);

it('should build the lib', () => {
runNxCommand(`deploy ${publishableLib} --dry-run`);
Expand Down
4 changes: 3 additions & 1 deletion e2e/ngx-deploy-npm-e2e/utils/lib-test-set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export function basicSetTestForLibs(
);

// Install the project
installNgxDeployNPMProject();
installNgxDeployNPMProject(
`--project="${uniqLibName}" --distFolderPath="dist/libs/${uniqLibName}"`
);

it('should publish the lib', () => {
expect(() => {
Expand Down
6 changes: 3 additions & 3 deletions tools/create-angular-workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ npx ng new --name angular-workspace --interactive false
cd angular-workspace

# Set the workspace on the right path
export NX_WORKSPACE_ROOT_PATH=`pwd`
export NX_WORKSPACE_ROOT_PATH=$(pwd)

echo "Generate lib"
npx ng generate library angular-lib
Expand All @@ -29,7 +29,7 @@ echo "Link ngx-deploy-npm"
yarn link ngx-deploy-npm

echo "Add ngx-deploy-npm to the workspace"
npx ng add ngx-deploy-npm
npx ng add ngx-deploy-npm --project angular-lib --dist-folder-path dist/libs/angular-lib

echo "Test the build"
npx ng deploy angular-lib --dry-run
npx ng deploy angular-lib --dry-run

0 comments on commit f245f6f

Please sign in to comment.