Skip to content

Commit

Permalink
[DOCS] Remove support for // CONSOLE magic comment (#46936) (#47110)
Browse files Browse the repository at this point in the history
#46180 added support for the `[source,console]`
language for snippets which should be tested.

This removes support for the `// CONSOLE` magic comment,
which serve a similar purpose.

Snippets that include the `// CONSOLE` magic comment will return
an exception.
  • Loading branch information
jrodewig authored Sep 25, 2019
1 parent d5f396f commit 365aa30
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,11 @@ public class RestTestsFromSnippetsTask extends SnippetsTask {
response(snippet)
return
}
if (snippet.test || snippet.console ||
snippet.language == 'console') {
if ((snippet.language == 'js') && (snippet.console)) {
throw new InvalidUserDataException(
"$snippet: Use `[source,console]` instead of `// CONSOLE`.")
}
if (snippet.test || snippet.language == 'console') {
test(snippet)
previousTest = snippet
return
Expand Down

0 comments on commit 365aa30

Please sign in to comment.