Skip to content

Commit

Permalink
tests: fix legacy test
Browse files Browse the repository at this point in the history
  • Loading branch information
Juiced66 committed Oct 30, 2024
1 parent c9cb2b8 commit c41e4bf
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions features/step_definitions/auth-steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,18 @@ Given(
should(token).not.be.undefined();

this.sdk.jwt = token;

const { valid } = await this.sdk.auth.checkToken();

this.sdk.jwt = previousToken;

if (not) {
should(valid).be.false("Provided token is valid");
if(not) {

Check failure on line 30 in features/step_definitions/auth-steps.js

View workflow job for this annotation

GitHub Actions / Lint - Node.js

Expected space(s) after "if"

Check failure on line 30 in features/step_definitions/auth-steps.js

View workflow job for this annotation

GitHub Actions / Lint - Node.js

Insert `·`
should(await this.sdk.auth.checkToken()).throwError({ id: "services.storage.not_found" });

Check failure on line 31 in features/step_definitions/auth-steps.js

View workflow job for this annotation

GitHub Actions / Lint - Node.js

Replace `·id:·"services.storage.not_found"` with `⏎········id:·"services.storage.not_found",⏎·····`
} else {
const { valid } = await this.sdk.auth.checkToken();
this.sdk.jwt = previousToken;
should(valid).be.true("Provided token is invalid");
}
},
);

Given("I save the created API key", function () {
this.props.token = this.props.result._source.token;
this.props.token = this.props.result.token;
});

Given(
Expand Down

0 comments on commit c41e4bf

Please sign in to comment.