File tree Expand file tree Collapse file tree 4 files changed +27685
-27674
lines changed
tests/docstrings_examples Expand file tree Collapse file tree 4 files changed +27685
-27674
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,9 @@ let extractExamples = async () => {
155155
156156let main = async () => {
157157 let examples = await extractExamples ()
158+ examples -> Array .sort ((a , b ) =>
159+ String .length (a .id ) > String .length (b .id ) ? Ordering .fromInt (1 ) : Ordering .fromInt (- 1 )
160+ )
158161 let testsContent =
159162 examples
160163 -> Array .filterMap (example => {
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import * as List from "rescript/lib/es6/List.js";
88import * as Path from "path" ;
99import * as $$Array from "rescript/lib/es6/Array.js" ;
1010import * as $$Error from "rescript/lib/es6/Error.js" ;
11+ import * as Ordering from "rescript/lib/es6/Ordering.js" ;
1112import * as Belt_List from "rescript/lib/es6/Belt_List.js" ;
1213import * as ArrayUtils from "./ArrayUtils.res.mjs" ;
1314import * as Belt_Array from "rescript/lib/es6/Belt_Array.js" ;
@@ -214,6 +215,13 @@ async function extractExamples() {
214215
215216async function main ( ) {
216217 let examples = await extractExamples ( ) ;
218+ examples . sort ( ( a , b ) => {
219+ if ( a . id . length > b . id . length ) {
220+ return Ordering . fromInt ( 1 ) ;
221+ } else {
222+ return Ordering . fromInt ( - 1 ) ;
223+ }
224+ } ) ;
217225 let testsContent = $$Array . filterMap ( examples , example => {
218226 let codeExamples = getCodeBlocks ( example ) ;
219227 let ignore = ignoreRuntimeTests . includes ( example . id ) ;
You can’t perform that action at this time.
0 commit comments