Skip to content

Commit

Permalink
Merge "REST: Fix api-testing npm script causing false positive"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Feb 20, 2025
2 parents bc35106 + c57fe0b commit 4dbbabe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions repo/rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"description": "OpenAPI definition of Wikibase REST API",
"scripts": {
"test": "npm run lint",
"api-testing:e2e-rest": "npm run mocha -- tests/mocha",
"api-testing:e2e-crud": "npm run mocha -- --require ../domains/crud/tests/mocha/api-testing/fixtures.cjs ../domains/crud/tests/mocha/api-testing",
"api-testing:e2e-rest": "npm run mocha -- tests/mocha/",
"api-testing:e2e-search": "npm run mocha -- ../domains/search/tests/mocha/api-testing",
"api-testing:spec-crud": "npm run mocha -- ../domains/crud/tests/mocha/openapi-validation",
"api-testing:spec-search": "npm run mocha -- ../domains/search/tests/mocha/openapi-validation",
"api-testing": "npm-run-all build:spec api-testing:*",
"api-testing": "npm-run-all api-testing:*",
"mocha": "mocha --timeout 0 --inline-diffs",
"lint": "npm-run-all --parallel lint:*",
"lint:openapi": "npm run spec:join && redocly lint specs/openapi-joined.json",
Expand Down
2 changes: 2 additions & 0 deletions repo/rest-api/tests/mocha/GetOpenApiDocTest.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
'use strict';

const { execSync } = require( 'node:child_process' );
const { bundle, loadConfig } = require( '@redocly/openapi-core' );
const { expect } = require( './helpers/chaiHelper' );
const { RequestBuilder } = require( './helpers/RequestBuilder' );

describe( 'GET /openapi.json', () => {

it( 'can GET the latest version of the OpenAPI document', async () => {
execSync( 'npm run spec:join' );
const config = await loadConfig( { configPath: 'redocly.yaml' } );
const schema = ( await bundle( { ref: './specs/openapi-joined.json', config, dereference: true } ) ).bundle.parsed;
const response = await new RequestBuilder()
Expand Down

0 comments on commit 4dbbabe

Please sign in to comment.