Skip to content

Commit

Permalink
Move font helper to test/helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Nov 15, 2024
1 parent 7469b44 commit 755422a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/group.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import './font';
import './helpers/font';
import React from 'react';
import { test, expect } from 'vitest';
import config, { Canvas } from '@napi-rs/canvas';
Expand Down
2 changes: 1 addition & 1 deletion test/font.ts → test/helpers/font.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { join } from 'path';
import { GlobalFonts } from '@napi-rs/canvas';

GlobalFonts.registerFromPath(
join(__dirname, 'Geist-Regular.otf'),
join(__dirname, '../Geist-Regular.otf'),
'Geist Sans',
);
2 changes: 1 addition & 1 deletion test/text.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import './font';
import './helpers/font';
import React from 'react';
import { test, expect } from 'vitest';
import config, { Canvas } from '@napi-rs/canvas';
Expand Down

0 comments on commit 755422a

Please sign in to comment.