mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-07-28 17:29:47 +08:00
✨ feat(connection): 支持导入Navicat NCX连接
This commit is contained in:
@@ -2,7 +2,7 @@ import { readFileSync } from 'node:fs';
|
||||
|
||||
import { beforeEach, describe, expect, it } from 'vitest';
|
||||
|
||||
import { setCurrentLanguage } from '../i18n';
|
||||
import { setCurrentLanguage, t } from '../i18n';
|
||||
import {
|
||||
detectConnectionImportKind,
|
||||
isConnectionPackagePasswordRequiredError,
|
||||
@@ -104,6 +104,10 @@ describe('connectionExport', () => {
|
||||
</Connections>`)).toBe('navicat-ncx');
|
||||
});
|
||||
|
||||
it('mentions Navicat NCX in unsupported import format guidance', () => {
|
||||
expect(t('app.connection_package.message.unsupported_file_format', undefined, 'zh-CN')).toContain('Navicat NCX');
|
||||
});
|
||||
|
||||
it('returns invalid for malformed or unsupported content', () => {
|
||||
expect(detectConnectionImportKind('{not-json}')).toBe('invalid');
|
||||
expect(detectConnectionImportKind(JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user