refactor(test): move test files to match `tools` directory (#24)
* refactor(test): move test files to match `tools` directory * Update to reflect node >= 16 Co-authored-by: Jeff Posnick <jeffy@google.com>
This commit is contained in:
Родитель
dfe80f39d2
Коммит
8ba5062952
|
@ -27,6 +27,6 @@ Run "tools/prepare.js" to generate a bundle of JSON representing Chrome's extens
|
|||
You can then pass this bundle to other tools like "tools/render-tsd.js".
|
||||
See [the wiki](https://github.com/GoogleChrome/chrome-types/wiki) for more.
|
||||
|
||||
Running the code requires Node 14+ as well as a working version of Python (3 is preferred, but 2.7+ should work) installed on your system.
|
||||
Running the code requires Node 16+ as well as a working version of Python (3 is preferred, but 2.7+ should work) installed on your system.
|
||||
This has only been tested on Linux and macOS.
|
||||
Python is used to convert Chromium's internal IDL format to JSON.
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
"@types/tmp": "^0.2.1",
|
||||
"@types/turndown": "^5.0.1",
|
||||
"check-code-coverage": "^1.10.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
|
|
15
package.json
15
package.json
|
@ -1,5 +1,13 @@
|
|||
{
|
||||
"scripts": {
|
||||
"build": "node tools/run-release.js",
|
||||
"test": "c8 --reporter=lcov --reporter=json --all --src=tools ava"
|
||||
},
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/fancy-log": "^1.3.1",
|
||||
"@types/mri": "^1.1.1",
|
||||
|
@ -26,10 +34,5 @@
|
|||
"tmp": "^0.2.1",
|
||||
"turndown": "^7.1.1",
|
||||
"typescript": "^4.4.3"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node tools/run-release.js",
|
||||
"test": "c8 --reporter=lcov --reporter=json --all --src=tools ava"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
import test from 'ava';
|
||||
import { RenderBuffer } from '../tools/lib/buffer.js';
|
||||
import { RenderBuffer } from '../../tools/lib/buffer.js';
|
||||
|
||||
|
||||
test('comment', t => {
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
import test from 'ava';
|
||||
import { generateLinesHash } from '../tools/lib/line-hash.js';
|
||||
import { generateLinesHash } from '../../tools/lib/line-hash.js';
|
||||
|
||||
test('line-hash', t => {
|
||||
const s1 = `/** This comment can change */
|
|
@ -15,9 +15,9 @@
|
|||
*/
|
||||
|
||||
import test from 'ava';
|
||||
import { RenderContext } from '../tools/lib/render-context.js';
|
||||
import { EmptyRenderOverride } from '../tools/override.js';
|
||||
import * as chromeTypes from '../types/chrome.js';
|
||||
import { RenderContext } from '../../tools/lib/render-context.js';
|
||||
import { EmptyRenderOverride } from '../../tools/override.js';
|
||||
import * as chromeTypes from '../../types/chrome.js';
|
||||
|
||||
|
||||
// TODO: This isn't as exhaustive as it should be. Chrome has a variety of types we should be
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
import test from 'ava';
|
||||
import { Semaphore } from '../tools/lib/semaphore.js';
|
||||
import { Semaphore } from '../../tools/lib/semaphore.js';
|
||||
|
||||
test('semaphore', async t => {
|
||||
const s = new Semaphore();
|
|
@ -15,8 +15,8 @@
|
|||
*/
|
||||
|
||||
import test from 'ava';
|
||||
import * as traverse from '../tools/lib/traverse.js';
|
||||
import * as chromeTypes from '../types/chrome.js';
|
||||
import * as traverse from '../../tools/lib/traverse.js';
|
||||
import * as chromeTypes from '../../types/chrome.js';
|
||||
|
||||
|
||||
// Helper used for forEach tests below.
|
Загрузка…
Ссылка в новой задаче