From 5f73052a59d43f1e7f48555fa09351b1ccc4975e Mon Sep 17 00:00:00 2001 From: Ilja Date: Tue, 15 Aug 2023 17:47:33 +0300 Subject: [PATCH] add default test for asset controller --- dangerfile.ts | 2 +- .../core/tests/controllers/AssetController.test.ts | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 packages/core/tests/controllers/AssetController.test.ts diff --git a/dangerfile.ts b/dangerfile.ts index 8cff341af6..db785477e9 100644 --- a/dangerfile.ts +++ b/dangerfile.ts @@ -240,7 +240,7 @@ async function checkSdkVersion() { if (wagmiConstants) { const diff = await diffForFile(wagmiConstants) - if (!diff?.added.includes(`VERSION = ${corePackageJson.version}`)) { + if (!diff?.added.includes(`VERSION = '${corePackageJson.version}'`)) { fail(`VERSION in ${wagmiConstantsPath} does not match latest packages/core version`) } } else { diff --git a/packages/core/tests/controllers/AssetController.test.ts b/packages/core/tests/controllers/AssetController.test.ts new file mode 100644 index 0000000000..f2e344f6bd --- /dev/null +++ b/packages/core/tests/controllers/AssetController.test.ts @@ -0,0 +1,14 @@ +import { describe, expect, it } from 'vitest' +import { AssetController } from '../../index.js' + +// -- Tests -------------------------------------------------------------------- +describe('AssetController', () => { + it('should have valid default state', () => { + expect(AssetController.state).toEqual({ + walletImages: {}, + networkImages: {}, + connectorImages: {}, + tokenImages: {} + }) + }) +})