Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Check import order in tet
Browse files Browse the repository at this point in the history
st files
  • Loading branch information
dzbo committed Oct 31, 2024
1 parent 5629cf3 commit 25dc3e4
Show file tree
Hide file tree
Showing 32 changed files with 38 additions and 9 deletions.
1 change: 0 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ module.exports = {
files: ['**/*.spec.ts'],
extends: ['plugin:playwright/playwright-test'],
rules: {
'import/order': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'playwright/no-standalone-expect': 'off',
'playwright/no-networkidle': 'off',
Expand Down
3 changes: 2 additions & 1 deletion components/__tests__/FollowCounters.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { renderSuspended } from '@nuxt/test-utils/runtime'
import { beforeEach, describe, expect, it, vi } from 'vitest'

import type { ProfileFollowers } from '@/types/profile'
import FollowCounters from '../FollowCounters.vue'

import type { ProfileFollowers } from '@/types/profile'

describe('FollowCounters', () => {
beforeEach(() => {
useIntl().setupIntl(defaultConfig)
Expand Down
1 change: 1 addition & 0 deletions domains/grid/components/__tests__/GridFloatingMenu.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { renderSuspended } from '@nuxt/test-utils/runtime'
import { createTestingPinia } from '@pinia/testing'
import { beforeEach, describe, expect, it, vi } from 'vitest'

import GridFloatingMenu from '../GridFloatingMenu.vue'

vi.mock('/utils/getCurrentProfileAddress', () => ({
Expand Down
2 changes: 1 addition & 1 deletion domains/grid/utils/__tests__/buildGrid.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { e } from 'pinia-orm/dist/shared/pinia-orm.ed84a779'
import { describe, expect, it } from 'vitest'

import { buildGrid } from '../buildGrid'

describe('buildGrid', () => {
Expand Down
1 change: 1 addition & 0 deletions domains/grid/utils/__tests__/compareGridWidgets.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest'

import { compareGridWidgets } from '../compareGridWidgets'

describe('compareGridWidgets', () => {
Expand Down
1 change: 1 addition & 0 deletions domains/grid/utils/__tests__/compareGrids.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest'

import { compareGrids } from '../compareGrids'

describe('compareGrids', () => {
Expand Down
1 change: 1 addition & 0 deletions domains/grid/utils/__tests__/createGridId.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest'

import { createGridId } from '../createGridId'

describe('createGridId', () => {
Expand Down
1 change: 1 addition & 0 deletions domains/grid/utils/__tests__/createWidgetObject.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it, vi } from 'vitest'

import { createWidgetObject } from '../createWidgetObject'

vi.mock('/domains/grid/utils/generateItemId', () => ({
Expand Down
1 change: 1 addition & 0 deletions domains/grid/utils/__tests__/gridParser.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest'

import { parsePlatformInput } from '../gridParser'

const YOUTUBE_IFRAME_ALLOW =
Expand Down
3 changes: 2 additions & 1 deletion domains/grid/utils/__tests__/gridToConfig.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it } from 'vitest'

import { gridToConfig } from '../gridToConfig'

describe('gridToConfig', () => {
Expand Down
1 change: 1 addition & 0 deletions domains/grid/utils/__tests__/purifyGridConfig.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it, vi } from 'vitest'

import { purifyGridConfig } from '../purifyGridConfig'

describe('purifyGridConfig', () => {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/404.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect } from '@playwright/test'

import { test } from './helpers/fixtures'

test('can access 404 page', async ({ page }) => {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect } from '@playwright/test'

import { test } from './helpers/fixtures'

test('landing page when no browser extension', async ({ page }) => {
Expand Down
11 changes: 6 additions & 5 deletions utils/__tests__/assetChecks.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { describe, expect, test } from 'vitest'

import { LSP4_TOKEN_TYPES } from '@lukso/lsp-smart-contracts'
import type {
SelectProfileOption,
SelectStringOption,
} from '@lukso/web-components'

import {
getBalance,
hasBalance,
Expand All @@ -20,6 +16,11 @@ import {
isToken,
} from '../assetChecks'

import type {
SelectProfileOption,
SelectStringOption,
} from '@lukso/web-components'

describe('isLyx', () => {
test('should return true if the asset is a LYX', async () => {
expect(
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/assetTypes.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect, test } from 'vitest'

import { getAssetType } from '../assetTypes'

test('getAssetType', () => {
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/cloneObject.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest'

import { cloneObject } from '../cloneObject'

describe('cloneObject', () => {
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/decodeParameter.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { describe, expect, test, vi } from 'vitest'
import ABICoder from 'web3-eth-abi'

import { decodeParameter } from '../decodeParameter'

describe('decodeParameter function', () => {
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/deepEqual.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest'

import { deepEqual } from '../deepEqual'

describe('deepEqual', () => {
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/externalUrls.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, test } from 'vitest'

import {
universalPageProfileUrl,
universalSwapsProfileUrl,
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/groupAttributes.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest'

import { groupAttributes } from '../groupAttributes'

describe('groupAttributes', () => {
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/hexToNumber.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, test, vi } from 'vitest'

import { hexToNumber } from '../hexToNumber'

describe('hexToNumber function', () => {
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/hexToUtf8.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, test, vi } from 'vitest'

import { hexToUtf8 } from '../hexToUtf8'

describe('hexToUtf8 function', () => {
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/isValidURL.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest'

import { isValidURL } from '../isValidURL'

describe('isValidURL', () => {
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/paddedToAddress.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect, test } from 'vitest'

import { paddedToAddress } from '../paddedToAddress'

test('paddedToAddress should remove zero padding from an address', async () => {
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/queryParamsString.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest'

import { queryParamsString } from '../queryParamsString'

describe('queryParamsString', () => {
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/slug.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest'

import { slug } from '../slug'

describe('slug', () => {
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/sort.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest'

import { stringSort } from '../sort'

describe('stringSort', () => {
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/tokenConversionWithDecimals.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest'

import {
fromTokenUnitWithDecimals,
toTokenUnitWithDecimals,
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/truncate.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest'

import { truncate } from '../truncate'

describe('truncate', () => {
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/unflatArray.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, test } from 'vitest'

import { unflatArray } from '../unflatArray'

test('handles consecutive indexes', () => {
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/validateLspMetadata.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, test } from 'vitest'

import {
validateAssets,
validateAttributes,
Expand Down
1 change: 1 addition & 0 deletions utils/__tests__/validators.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, test } from 'vitest'

import {
assertAddress,
assertAddresses,
Expand Down

0 comments on commit 25dc3e4

Please sign in to comment.