File tree Expand file tree Collapse file tree 3 files changed +62
-19
lines changed
Expand file tree Collapse file tree 3 files changed +62
-19
lines changed Original file line number Diff line number Diff line change 3333 "name" : " index.html" ,
3434 "request" : " launch" ,
3535 "type" : " msedge" ,
36- "url" : " http://localhost:5521 /index.html" ,
36+ "url" : " http://localhost:5173 /index.html" ,
3737 "runtimeArgs" : [
3838 " --disable-web-security"
3939 ],
Original file line number Diff line number Diff line change 3131 < h1 > ESM Quick Test</ h1 >
3232 < div id ="placeholder "> </ div >
3333 < script type ="module ">
34- import { Workunit } from "./src /index.browser .ts" ;
35-
36- Workunit . submit ( { baseUrl : "http://localhost:8010" } , "hthor" , "'Hello and Welcome!';" )
37- . then ( ( wu ) => {
38- return wu . watchUntilComplete ( ) ;
39- } ) . then ( ( wu ) => {
40- return wu . fetchResults ( ) . then ( ( results ) => {
41- return results [ 0 ] . fetchRows ( ) ;
42- } ) . then ( ( rows ) => {
43- return wu ;
44- } ) ;
45- } ) . then ( ( wu ) => {
46- return wu . delete ( ) . then ( ( ) => wu ) ;
47- } ) . then ( wu => {
48- console . log ( "Deleted WU: " + wu . Wuid , wu . isDeleted ( ) ) ;
49- } ) . catch ( ( e ) => {
50- console . error ( e ) ;
51- } ) ;
34+ import { test } from "./tests /index.ts" ;
35+ test ( ) ;
36+ // Workunit.submit({ baseUrl: "http://localhost:8010" }, "hthor", "'Hello and Welcome!';")
37+ // .then((wu) => {
38+ // return wu.watchUntilComplete();
39+ // }).then((wu) => {
40+ // return wu.fetchResults().then((results) => {
41+ // return results[0].fetchRows();
42+ // }).then((rows) => {
43+ // return wu;
44+ // });
45+ // }).then((wu) => {
46+ // return wu.delete().then(() => wu);
47+ // }).then(wu => {
48+ // console.log("Deleted WU: " + wu.Wuid, wu.isDeleted());
49+ // }).catch((e) => {
50+ // console.error(e);
51+ // });
5252 </ script >
5353</ body >
5454
Original file line number Diff line number Diff line change 1+ import { scopedLogger } from "@hpcc-js/util" ;
2+ import { Workunit } from "@hpcc-js/comms" ;
3+
4+ const logger = scopedLogger ( "tests" ) ;
5+
6+ export function test ( ) {
7+ const wu = Workunit . attach ( { baseUrl : "http://localhost:8010" } , "W20250806-122131" ) ;
8+
9+ Promise . all ( [
10+ wu . fetchInfo ( { IncludeExceptions : true } ) ,
11+ wu . fetchDetailsNormalized ( {
12+ ScopeFilter : "logical:*" ,
13+ NestedFilter : "" ,
14+ PropertiesToReturn : {
15+ AllScopes : true ,
16+ AllAttributes : true ,
17+ AllProperties : true ,
18+ AllNotes : true ,
19+ AllStatistics : true ,
20+ AllHints : true
21+ } ,
22+ ScopeOptions : {
23+ IncludeId : true ,
24+ IncludeScope : true ,
25+ IncludeScopeType : true ,
26+ IncludeMatchedScopesInResults : true
27+ } ,
28+ PropertyOptions : {
29+ IncludeName : true ,
30+ IncludeRawValue : true ,
31+ IncludeFormatted : true ,
32+ IncludeMeasure : true ,
33+ IncludeCreator : false ,
34+ IncludeCreatorType : false
35+ }
36+ } )
37+ ] ) . then ( ( [ info , response ] ) => {
38+ debugger ;
39+ } ) . catch ( e => {
40+ logger . error ( e ) ;
41+ } ) . finally ( ( ) => {
42+ } ) ;
43+ }
You can’t perform that action at this time.
0 commit comments