Skip to content

Commit

Permalink
Sm/test async without await (#671)
Browse files Browse the repository at this point in the history
* test: remove extra awaits

* chore: eslint stricter for tests
  • Loading branch information
mshanemc authored Jul 6, 2023
1 parent a2093bb commit 0b7c749
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
10 changes: 0 additions & 10 deletions test/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,7 @@ module.exports = {
rules: {
// Allow assert style expressions. i.e. expect(true).to.be.true
'no-unused-expressions': 'off',

// It is common for tests to stub out method.

// Return types are defined by the source code. Allows for quick overwrites.
'@typescript-eslint/explicit-function-return-type': 'off',
// Mocked out the methods that shouldn't do anything in the tests.
'@typescript-eslint/no-empty-function': 'off',
// Easily return a promise in a mocked method.
'@typescript-eslint/require-await': 'off',

'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
},
};
2 changes: 1 addition & 1 deletion test/commands/create.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('creates a user from a file and verifies', () => {
// there will also be a profile in there, too, with a cryptic name on it
expect(queryResult.records.some((assignment) => assignment.PermissionSet.Name === 'VolunteeringApp'));
});
it('verifies the new user appears in list of users for the org', async () => {
it('verifies the new user appears in list of users for the org', () => {
const output = execCmd<AuthList[]>(`org:list:users --json -u ${session.orgs.get('default')?.username}`, {
ensureExitCode: 0,
}).jsonOutput;
Expand Down
4 changes: 2 additions & 2 deletions test/commands/permsetlicense/assign.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('PermissionSetLicense tests', () => {
});

describe('multiple PSL via onBehalfOf', () => {
it('assigns a psl to multiple users via onBehalfOf', async () => {
it('assigns a psl to multiple users via onBehalfOf', () => {
const anotherPSL = 'SurveyCreatorPsl';
const originalUsername = session.orgs.get('default')?.username;

Expand All @@ -84,7 +84,7 @@ describe('PermissionSetLicense tests', () => {
]);
});

it('assigns a psl to multiple users via onBehalfOf (partial success)', async () => {
it('assigns a psl to multiple users via onBehalfOf (partial success)', () => {
// sales console user can't be assigned to a platform license
const anotherPSL = 'SalesConsoleUser';
const originalUsername = session.orgs.get('default')?.username;
Expand Down

0 comments on commit 0b7c749

Please sign in to comment.