chore: bring deps and other things up to date
This commit is contained in:
parent
b99a2976b8
commit
ee534771e1
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "obsidian-testing-framework-parent",
|
||||
"private": true,
|
||||
"packageManager": "yarn@4.5.1",
|
||||
"packageManager": "yarn@4.12.0+sha512.f45ab632439a67f8bc759bf32ead036a1f413287b9042726b7cc4818b7b49e14e9423ba49b18f9e06ea4941c1ad062385b1d8760a8d5091a1a31e5f6219afca8",
|
||||
"workspaces": [
|
||||
"./packages/*"
|
||||
]
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "obsidian-testing-framework",
|
||||
"packageManager": "yarn@4.5.1",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@codemirror/language": "https://github.com/lishid/cm-language",
|
||||
"@codemirror/state": "^6.0.1",
|
||||
@ -18,6 +19,11 @@
|
||||
"./lib",
|
||||
"../../README.md"
|
||||
],
|
||||
"exports": {
|
||||
"./fixture": "./lib/fixtures.js",
|
||||
"./util": "./lib/util.js",
|
||||
".": "./lib/index.js"
|
||||
},
|
||||
"readme": "",
|
||||
"version": "0.1.8",
|
||||
"main": "./lib/index.js",
|
||||
@ -34,7 +40,6 @@
|
||||
"devDependencies": {
|
||||
"@types/tmp": "^0",
|
||||
"rimraf": "^6.0.1",
|
||||
"vitest": "^2.1.3"
|
||||
},
|
||||
"type": "module"
|
||||
"vitest": "^4.0.18"
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ const getFile = (file: string): TFile => {
|
||||
}
|
||||
|
||||
/**
|
||||
* asserts all lines in the given range match a regex.
|
||||
* asserts that lines in the given range match a regex.
|
||||
*
|
||||
* @export
|
||||
* @param {Page} page - a Playwright page
|
||||
@ -95,7 +95,7 @@ const getFile = (file: string): TFile => {
|
||||
export async function assertLinesMatch(page: Page, path: string, start: number, end: number, regex: RegExp, cached: boolean = true) {
|
||||
const fileContent = await readFile(page, path, cached);
|
||||
const lines = fileContent.split("\n").slice(start, end);
|
||||
expect(lines.every(l => regex.test(l))).toEqual(true);
|
||||
expect(lines.some(l => regex.test(l))).toEqual(true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
6
packages/obsidian-testing-framework/typings/vitest.d.ts
vendored
Normal file
6
packages/obsidian-testing-framework/typings/vitest.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
import { ObsidianTestingConfig } from "../src";
|
||||
|
||||
declare module 'vitest' {
|
||||
export interface ProvidedContext extends ObsidianTestingConfig {
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import {test} from "obsidian-testing-framework"
|
||||
import {TFile} from "obsidian";
|
||||
import {assertLineEquals, doWithApp, readFile} from "obsidian-testing-framework/utils";
|
||||
import {assertLineEquals, doWithApp, readFile} from "obsidian-testing-framework/util";
|
||||
test('something', async ({ page }) => {
|
||||
console.log(page.url());
|
||||
expect(/obsidian\.md/i.test(page.url())).toBeTruthy()
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
"private": true,
|
||||
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
|
||||
"main": "main.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "node esbuild.config.mjs",
|
||||
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
|
||||
@ -27,8 +28,7 @@
|
||||
"playwright": "^1.48.1",
|
||||
"tslib": "2.4.0",
|
||||
"typescript": "4.7.4",
|
||||
"vitest": "^2.1.3",
|
||||
"vitest": "^4.0.18",
|
||||
"xvfb-maybe": "^0.2.1"
|
||||
},
|
||||
"type": "module"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user