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:
Michael Solati 2022-03-23 08:27:14 -07:00 коммит произвёл GitHub
Родитель dfe80f39d2
Коммит 8ba5062952
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
8 изменённых файлов: 21 добавлений и 15 удалений

Просмотреть файл

@ -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.

3
package-lock.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": {

Просмотреть файл

@ -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.