From 7cf06b369b53fbf142a13765a3ef441a3dff3de9 Mon Sep 17 00:00:00 2001 From: DieMyst Date: Wed, 21 Feb 2024 13:10:47 +0700 Subject: [PATCH] fix unit test --- server/src/test/info.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/test/info.test.ts b/server/src/test/info.test.ts index 304a3ed..caf55cd 100644 --- a/server/src/test/info.test.ts +++ b/server/src/test/info.test.ts @@ -7,6 +7,7 @@ import { Location, Position, Range } from 'vscode-languageserver'; import { compileAqua } from '../validation'; import { DocumentInfo } from '../info'; import { pathToUri, tokenToLocation } from '../utils'; +import { ScalarType } from '@fluencelabs/aqua-language-server-api/aqua-lsp-api'; /** * Load document from file, compile it and return info @@ -77,7 +78,10 @@ describe('DocumentInfo Test Suite', () => { const info = docInfo.infoAt(pos); assert.ok(info, 'Info not found'); - assert.strictEqual(info.type, 'string', 'Wrong type info'); + + const type = info.type as ScalarType; + assert.strictEqual(type.tag, 'scalar', 'Wrong type tag'); + assert.strictEqual(type.name, 'string', 'Wrong type'); } } });