Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ on:
jobs:
build:

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

strategy:
matrix:
node-version: [16.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install --legacy-peer-deps
- run: npm i --force
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"sinon": "15.2.0",
"sinon-chai": "3.7.0",
"testcafe": "3.0.1",
"ts-morph": "3.1.3",
"ts-morph": "19.0.0",
"ts-node": "10.9.1",
"tsd-jsdoc": "2.5.0",
"typedoc": "0.24.8",
Expand Down
14 changes: 7 additions & 7 deletions test/runner/definitions_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const pathToTypings = path.resolve(pathToRootOfProject, 'typings');
chai.use(chaiSubset);

describe('Definitions', function () {
this.timeout(20000);
this.timeout(30000);
this.retries(4);
before(() => {
execSync('npm run def', { cwd: pathToRootOfProject });
Expand All @@ -39,7 +39,7 @@ describe('Definitions', function () {
types.should.be.valid;

const definitionsFile = types.getSourceFileOrThrow(pathOfJSDocDefinitions);
const index = definitionsFile.getNamespaceOrThrow('CodeceptJS').getNamespaceOrThrow('index').getStructure();
const index = definitionsFile.getModule('CodeceptJS').getModule('index').getStructure();
index.statements.should.containSubset([
{ declarations: [{ name: 'recorder', type: 'CodeceptJS.recorder' }] },
{ declarations: [{ name: 'event', type: 'typeof CodeceptJS.event' }] },
Expand All @@ -61,7 +61,7 @@ describe('Definitions', function () {
types.should.be.valid;

const definitionFile = types.getSourceFileOrThrow(`${codecept_dir}/steps.d.ts`);
const extend = getExtends(definitionFile.getNamespaceOrThrow('CodeceptJS').getInterfaceOrThrow('I'));
const extend = getExtends(definitionFile.getModule('CodeceptJS').getInterfaceOrThrow('I'));
extend.should.containSubset([{
methods: [{
name: 'amInPath',
Expand Down Expand Up @@ -115,7 +115,7 @@ describe('Definitions', function () {
returnType: undefined,
kind: StructureKind.Method,
}]);
const I = getExtends(definitionsFile.getNamespaceOrThrow('CodeceptJS').getInterfaceOrThrow('I'));
const I = getExtends(definitionsFile.getModule('CodeceptJS').getInterfaceOrThrow('I'));
I.should.containSubset([{
methods: [{
name: 'openDir',
Expand Down Expand Up @@ -184,7 +184,7 @@ describe('Definitions', function () {
types.should.be.valid;

const definitionsFile = types.getSourceFileOrThrow(`${codecept_dir}/steps.d.ts`);
const CallbackOrder = definitionsFile.getNamespaceOrThrow('CodeceptJS').getInterfaceOrThrow('SupportObject').getStructure();
const CallbackOrder = definitionsFile.getModule('CodeceptJS').getInterfaceOrThrow('SupportObject').getStructure();
CallbackOrder.properties.should.containSubset([
{ name: 'I', type: 'I' },
{ name: 'MyPage', type: 'MyPage' },
Expand All @@ -201,7 +201,7 @@ describe('Definitions', function () {
types.should.be.valid;

const definitionFile = types.getSourceFileOrThrow(`${codecept_dir}/steps.d.ts`);
const extend = getExtends(definitionFile.getNamespaceOrThrow('CodeceptJS').getInterfaceOrThrow('I'));
const extend = getExtends(definitionFile.getModule('CodeceptJS').getInterfaceOrThrow('I'));
extend.should.containSubset([{
methods: [{
name: 'amInPath',
Expand Down Expand Up @@ -282,7 +282,7 @@ function typesFrom(sourceFile) {
tsConfigFilePath: path.join(pathToRootOfProject, 'tsconfig.json'),
resolutionHost,
});
project.addExistingSourceFile(sourceFile);
project.addSourceFileAtPath(sourceFile);
project.resolveSourceFileDependencies();
return project;
}
Expand Down