all repos

onasty @ b3a528a

a one-time notes service
6 files changed, 2 insertions(+), 103 deletions(-)
web: nuke all tests since they are not actually used (#215)

* web: nuke all tests since they are not actually used

* web: remove elm testing deps
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed by: GitHub noreply@github.com
Committed at: 2025-09-22 16:19:36 +0300
Parent: ffa0326
M .github/workflows/elm.yml
···
        45
        45
         

      
        46
        46
               - name: elm-format

      
        47
        47
                 run: bunx elm-format --validate src/

      
        48
        
        -

      
        49
        
        -

      
        50
        
        -      - name: Tests

      
        51
        
        -        run: bunx elm-test-rs

      
        52
        
        -

      
M web/elm.json
···
        27
        27
                 }

      
        28
        28
             },

      
        29
        29
             "test-dependencies": {

      
        30
        
        -        "direct": {

      
        31
        
        -            "elm-explorations/test": "2.2.0"

      
        32
        
        -        },

      
        33
        
        -        "indirect": {

      
        34
        
        -            "elm/random": "1.0.0"

      
        35
        
        -        }

      
        
        30
        +        "direct": {},

      
        
        31
        +        "indirect": {}

      
        36
        32
             }

      
        37
        33
         }

      
D web/tests/UnitTests/Data/Credentiala.elm
···
        1
        
        -module UnitTests.Data.Credentiala exposing (suite)

      
        2
        
        -

      
        3
        
        -import Data.Credentials

      
        4
        
        -import Expect

      
        5
        
        -import Json.Decode as Json

      
        6
        
        -import Test exposing (Test, describe, test)

      
        7
        
        -

      
        8
        
        -

      
        9
        
        -suite : Test

      
        10
        
        -suite =

      
        11
        
        -    describe "Data.Credentials"

      
        12
        
        -        [ test "decode" <|

      
        13
        
        -            \_ ->

      
        14
        
        -                """

      
        15
        
        -                {

      
        16
        
        -                    "access_token": "access.token.value",

      
        17
        
        -                    "refresh_token": "refresh-token-value"

      
        18
        
        -                }

      
        19
        
        -                """

      
        20
        
        -                    |> Json.decodeString Data.Credentials.decode

      
        21
        
        -                    |> Expect.ok

      
        22
        
        -        ]

      
D web/tests/UnitTests/Data/Error.elm
···
        1
        
        -module UnitTests.Data.Error exposing (suite)

      
        2
        
        -

      
        3
        
        -import Data.Error

      
        4
        
        -import Expect

      
        5
        
        -import Json.Decode as Json

      
        6
        
        -import Test exposing (Test, describe, test)

      
        7
        
        -

      
        8
        
        -

      
        9
        
        -suite : Test

      
        10
        
        -suite =

      
        11
        
        -    describe "Data.Error"

      
        12
        
        -        [ test "decode" <|

      
        13
        
        -            \_ ->

      
        14
        
        -                """ {"message": "some kind of an error"} """

      
        15
        
        -                    |> Json.decodeString Data.Error.decode

      
        16
        
        -                    |> Expect.ok

      
        17
        
        -        ]

      
D web/tests/UnitTests/Data/Me.elm
···
        1
        
        -module UnitTests.Data.Me exposing (suite)

      
        2
        
        -

      
        3
        
        -import Data.Me

      
        4
        
        -import Expect

      
        5
        
        -import Json.Decode as Json

      
        6
        
        -import Test exposing (Test, describe, test)

      
        7
        
        -

      
        8
        
        -

      
        9
        
        -suite : Test

      
        10
        
        -suite =

      
        11
        
        -    describe "Data.Me"

      
        12
        
        -        [ test "decode" <|

      
        13
        
        -            \_ ->

      
        14
        
        -                """

      
        15
        
        -                {

      
        16
        
        -                  "email": "admin@onasty.local",

      
        17
        
        -                  "created_at": "2025-06-06T19:44:17.370068Z",

      
        18
        
        -                  "last_login_at": "2025-07-06T17:15:23.380068Z",

      
        19
        
        -                  "notes_created": 42

      
        20
        
        -                }

      
        21
        
        -                """

      
        22
        
        -                    |> Json.decodeString Data.Me.decode

      
        23
        
        -                    |> Expect.ok

      
        24
        
        -        ]

      
D web/tests/UnitTests/Data/Note.elm
···
        1
        
        -module UnitTests.Data.Note exposing (suite)

      
        2
        
        -

      
        3
        
        -import Data.Note

      
        4
        
        -import Expect

      
        5
        
        -import Json.Decode as D

      
        6
        
        -import Test exposing (Test, describe, test)

      
        7
        
        -

      
        8
        
        -

      
        9
        
        -suite : Test

      
        10
        
        -suite =

      
        11
        
        -    describe "Data.Note"

      
        12
        
        -        [ test "decodeCreateResponse"

      
        13
        
        -            (\_ ->

      
        14
        
        -                """ {"slug":"the.note-slug"} """

      
        15
        
        -                    |> D.decodeString Data.Note.decodeCreateResponse

      
        16
        
        -                    |> Expect.ok

      
        17
        
        -            )

      
        18
        
        -        , test "decodeMetadata"

      
        19
        
        -            (\_ ->

      
        20
        
        -                """

      
        21
        
        -                {

      
        22
        
        -                    "created_at": "2023-10-01T12:00:00Z",

      
        23
        
        -                    "has_password": false

      
        24
        
        -                }

      
        25
        
        -                """

      
        26
        
        -                    |> D.decodeString Data.Note.decodeMetadata

      
        27
        
        -                    |> Expect.ok

      
        28
        
        -            )

      
        29
        
        -        ]