Skip to content

Commit

Permalink
fix(test): normalise gradle paths
Browse files Browse the repository at this point in the history
  • Loading branch information
breautek committed May 9, 2024
1 parent b7e0392 commit 9683461
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/unit/builders/ProjectBuilder.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ describe('ProjectBuilder', () => {

it('should run gradle wrapper 8.7', async () => {
await builder.installGradleWrapper('8.7');
expect(execaSpy).toHaveBeenCalledWith('/root/gradlew', ['-p', '/root', 'wrapper', '--gradle-version', '8.7', '--validate-url'], jasmine.any(Object));
expect(execaSpy).toHaveBeenCalledWith(path.normalize('/root/gradlew'), ['-p', '/root', 'wrapper', '--gradle-version', '8.7', '--validate-url'], jasmine.any(Object));
});

it('CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL should override gradle version', async () => {
process.env.CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL = 'https://dist.local';
await builder.installGradleWrapper('8.7');
delete process.env.CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL;
expect(execaSpy).toHaveBeenCalledWith('/root/gradlew', ['-p', '/root', 'wrapper', '--gradle-distribution-url', 'https://dist.local', '--validate-url'], jasmine.any(Object));
expect(execaSpy).toHaveBeenCalledWith(path.normalize('/root/gradlew'), ['-p', '/root', 'wrapper', '--gradle-distribution-url', 'https://dist.local', '--validate-url'], jasmine.any(Object));
});

it('should error if attempting to install an unacceptable gradle version', async () => {
Expand Down

0 comments on commit 9683461

Please sign in to comment.