Seperate test scripts into 3 different scripts.

This commit is contained in:
Dillon Kearns 2022-12-08 09:47:13 -08:00
parent 1c746bef8d
commit 11c5897737
4 changed files with 79 additions and 51 deletions

View File

@ -1,51 +0,0 @@
module Hello exposing (run)
import DataSource
import DataSource.Http
import Json.Decode as Decode
import Pages.Script as Script exposing (Script)
run : Script
run =
--Script.withoutCliOptions
-- (Script.log "-> 1"
-- |> DataSource.andThen
-- (\_ ->
-- Script.log "-> 2"
-- |> DataSource.andThen
-- (\_ ->
-- -- let
-- -- _ =
-- -- Debug.log "___3___" ()
-- -- in
-- Script.log "-> 3"
-- |> DataSource.andThen
-- (\_ ->
-- --DataSource.Http.get
-- -- "https://api.github.com/repos/dillonkearns/elm-pages"
-- -- (Decode.field "stargazers_count" Decode.int)
-- -- |> DataSource.andThen
-- -- (\stars ->
-- -- Script.log (String.fromInt stars)
-- -- )
-- Script.log "-> 4"
-- )
-- )
-- )
-- )
Script.withoutCliOptions
(Script.log "-> 1"
|> DataSource.andThen
(\_ ->
Script.log "-> 1"
|> DataSource.andThen
(\_ ->
Script.log "-> 1"
|> DataSource.andThen
(\_ ->
Script.log "-> 1"
)
)
)
)

View File

@ -0,0 +1,23 @@
module RepeatLog exposing (run)
import DataSource
import Pages.Script as Script exposing (Script)
run : Script
run =
Script.withoutCliOptions
(Script.log "-> 1"
|> DataSource.andThen
(\_ ->
Script.log "-> 1"
|> DataSource.andThen
(\_ ->
Script.log "-> 1"
|> DataSource.andThen
(\_ ->
Script.log "-> 1"
)
)
)
)

View File

@ -0,0 +1,31 @@
module SequenceHttpLog exposing (run)
import DataSource
import DataSource.Http
import Json.Decode as Decode
import Pages.Script as Script exposing (Script)
run : Script
run =
Script.withoutCliOptions
(Script.log "-> 1"
|> DataSource.andThen
(\_ ->
Script.log "-> 2"
|> DataSource.andThen
(\_ ->
Script.log "-> 3"
|> DataSource.andThen
(\_ ->
DataSource.Http.get
"https://api.github.com/repos/dillonkearns/elm-pages"
(Decode.field "stargazers_count" Decode.int)
|> DataSource.andThen
(\stars ->
Script.log (String.fromInt stars)
)
)
)
)
)

View File

@ -0,0 +1,25 @@
module SequenceLog exposing (run)
import DataSource
import DataSource.Http
import Json.Decode as Decode
import Pages.Script as Script exposing (Script)
run : Script
run =
Script.withoutCliOptions
(Script.log "-> 1"
|> DataSource.andThen
(\_ ->
Script.log "-> 2"
|> DataSource.andThen
(\_ ->
Script.log "-> 3"
|> DataSource.andThen
(\_ ->
Script.log "-> 4"
)
)
)
)