Skip to content

Commit e21dd10

Browse files
committed
fix: Cypress runs in the browser thus it does not have access to Node internals
So we use `@nextcloud/paths` instead. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 328b325 commit e21dd10

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

lib/commands/docker.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
55

6-
function basename(path: string): string {
7-
return path.split('/').pop() as string
8-
}
9-
6+
import { basename } from '@nextcloud/paths'
107

118
function getContainerName(): Cypress.Chainable<string> {
129
return cy.exec('pwd').then(({ stdout }) => {

package-lock.json

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
},
8484
"homepage": "https://github.com/nextcloud/nextcloud-cypress",
8585
"dependencies": {
86+
"@nextcloud/paths": "^2.2.1",
8687
"dockerode": "^4.0.2",
8788
"fast-xml-parser": "^5.2.2",
8889
"wait-on": "^8.0.0"

0 commit comments

Comments
 (0)