mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Move unit tests to right folder, push font fixtures
This commit is contained in:
@@ -3,7 +3,6 @@ node_modules/
|
||||
coverage/
|
||||
|
||||
lib/
|
||||
fonts/
|
||||
|
||||
.env
|
||||
.vscode/
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+5
-7
@@ -6,9 +6,7 @@
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import { assert } from 'chai';
|
||||
|
||||
const fontLigatures = require('../out-esbuild/fontLigatures/index');
|
||||
const loadBuffer: (buffer: ArrayBuffer, options?: { cacheSize?: number }) => Font = fontLigatures.loadBuffer;
|
||||
import { loadBuffer } from './index';
|
||||
|
||||
interface Font {
|
||||
findLigatures(text: string): { outputGlyphs: number[]; contextRanges: [number, number][] };
|
||||
@@ -263,10 +261,10 @@ const ubuntuCases: TestCase[] = [
|
||||
];
|
||||
|
||||
const fontPaths: Record<string, string> = {
|
||||
'Fira Code': path.join(__dirname, '../fonts/FiraCode-Regular.otf'),
|
||||
'Iosevka': path.join(__dirname, '../fonts/iosevka-regular.ttf'),
|
||||
'Monoid': path.join(__dirname, '../fonts/Monoid-Regular.ttf'),
|
||||
'Ubuntu Mono': path.join(__dirname, '../fonts/UbuntuMono-Regular.ttf')
|
||||
'Fira Code': path.join(__dirname, '../../fonts/FiraCode-Regular.otf'),
|
||||
'Iosevka': path.join(__dirname, '../../fonts/iosevka-regular.ttf'),
|
||||
'Monoid': path.join(__dirname, '../../fonts/Monoid-Regular.ttf'),
|
||||
'Ubuntu Mono': path.join(__dirname, '../../fonts/UbuntuMono-Regular.ttf')
|
||||
};
|
||||
|
||||
const fontCache: Map<string, Font> = new Map();
|
||||
+1
-2
@@ -4,8 +4,7 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
const mergeTrees = require('../out-esbuild/fontLigatures/merge').default;
|
||||
import mergeTrees from './merge';
|
||||
|
||||
interface LookupResult {
|
||||
contextRange: [number, number];
|
||||
+1
-2
@@ -4,8 +4,7 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
const mergeRange = require('../out-esbuild/fontLigatures/mergeRange').default;
|
||||
import mergeRange from './mergeRange';
|
||||
|
||||
describe('addon-ligatures - mergeRange', () => {
|
||||
it('inserts a new range before the existing ones', () => {
|
||||
+1
-2
@@ -4,8 +4,7 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
const parse = require('../out-esbuild/parse').default;
|
||||
import parse from './parse';
|
||||
|
||||
// TODO: integrate tests from http://test.csswg.org/suites/css-fonts-4_dev/nightly-unstable/
|
||||
describe('addon-ligatures - parse', () => {
|
||||
@@ -9,7 +9,9 @@
|
||||
"noUnusedLocals": true,
|
||||
"preserveWatchOutput": true,
|
||||
"types": [
|
||||
"../../../node_modules/@types/mocha"
|
||||
"../../../node_modules/@types/mocha",
|
||||
// HACK: src shouldn't use node types but it's needed for index.test.ts
|
||||
"../../../node_modules/@types/node"
|
||||
],
|
||||
"paths": {
|
||||
"@xterm/addon-ligatures" : [
|
||||
|
||||
Reference in New Issue
Block a user