Skip to content

Commit

Permalink
ci: wip fixing snippet-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rolljee committed Oct 31, 2024
1 parent e4298bb commit 149a15a
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .ci/doc/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,11 @@ services:
apt-get install -y curl;
npm install -g \
[email protected];
cd /mnt;
npm install;
cd /var/snippets/web;
cp /mnt/.ci/doc/puppeteer.js /var/snippets/web/;
npm install \
/mnt/.ci/doc \
/mnt/ \
puppeteer \
eslint \
eslint-plugin-html \
eslint-plugin-import \
Expand Down Expand Up @@ -111,6 +110,7 @@ services:
cp /mnt/.ci/doc/webpackBuild.js /var/snippets/webpack/;
npm install \
/mnt/ \
puppeteer \
babel-loader \
@babel/core \
html-webpack-plugin \
Expand Down
9 changes: 9 additions & 0 deletions .ci/doc/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "docs",
"version": "1.0.0",
"description": "docs for kuzzle-sdk",
"author": "The Kuzzle Team <[email protected]>",
"scripts": {},
"dependencies": {},
"devDependencies": {}
}
2 changes: 1 addition & 1 deletion doc/7/controllers/collection/exists/snippets/exists.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
try {
const exists = kuzzle.collection.exists('nyc-open-data', 'green-taxi');
const exists = await kuzzle.collection.exists('nyc-open-data', 'green-taxi');

if (exists) {
console.log('Success');
Expand Down
2 changes: 1 addition & 1 deletion doc/7/controllers/index/delete/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
code: true
type: page
title: delete
description: Deletes an index
description: Delete an index
---

# delete
Expand Down
2 changes: 1 addition & 1 deletion doc/7/controllers/index/delete/snippets/delete.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
try {
kuzzle.index.delete('nyc-open-data');
await kuzzle.index.delete('nyc-open-data');

console.log('Index deleted');
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion doc/7/controllers/index/delete/snippets/delete.test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: index#delete
description: Deletes an index
description: Delete an index
hooks:
before: curl -X POST kuzzle:7512/nyc-open-data/_create
after:
Expand Down
40 changes: 40 additions & 0 deletions src/utils/browser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 149a15a

Please sign in to comment.