commit
						e295035982
					
				
					 6 changed files with 87 additions and 0 deletions
				
			
		
							
								
								
									
										23
									
								
								.github/workflows/test.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								.github/workflows/test.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,23 @@ | ||||||
|  | name: test | ||||||
|  | 
 | ||||||
|  | on: | ||||||
|  |   push: | ||||||
|  |     branches: | ||||||
|  |       - master | ||||||
|  |       - main | ||||||
|  |   pull_request: | ||||||
|  | 
 | ||||||
|  | jobs: | ||||||
|  |   test: | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     steps: | ||||||
|  |       - uses: actions/checkout@v4 | ||||||
|  |       - uses: erlef/setup-beam@v1 | ||||||
|  |         with: | ||||||
|  |           otp-version: "26.0.2" | ||||||
|  |           gleam-version: "1.3.2" | ||||||
|  |           rebar3-version: "3" | ||||||
|  |           # elixir-version: "1.15.4" | ||||||
|  |       - run: gleam deps download | ||||||
|  |       - run: gleam test | ||||||
|  |       - run: gleam format --check src test | ||||||
							
								
								
									
										4
									
								
								.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | ||||||
|  | *.beam | ||||||
|  | *.ez | ||||||
|  | /build | ||||||
|  | erl_crash.dump | ||||||
							
								
								
									
										24
									
								
								README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								README.md
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | ||||||
|  | # webtest | ||||||
|  | 
 | ||||||
|  | [](https://hex.pm/packages/webtest) | ||||||
|  | [](https://hexdocs.pm/webtest/) | ||||||
|  | 
 | ||||||
|  | ```sh | ||||||
|  | gleam add webtest@1 | ||||||
|  | ``` | ||||||
|  | ```gleam | ||||||
|  | import webtest | ||||||
|  | 
 | ||||||
|  | pub fn main() { | ||||||
|  |   // TODO: An example of the project in use | ||||||
|  | } | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | Further documentation can be found at <https://hexdocs.pm/webtest>. | ||||||
|  | 
 | ||||||
|  | ## Development | ||||||
|  | 
 | ||||||
|  | ```sh | ||||||
|  | gleam run   # Run the project | ||||||
|  | gleam test  # Run the tests | ||||||
|  | ``` | ||||||
							
								
								
									
										19
									
								
								gleam.toml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								gleam.toml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | ||||||
|  | name = "webtest" | ||||||
|  | version = "1.0.0" | ||||||
|  | 
 | ||||||
|  | # Fill out these fields if you intend to generate HTML documentation or publish | ||||||
|  | # your project to the Hex package manager. | ||||||
|  | # | ||||||
|  | # description = "" | ||||||
|  | # licences = ["Apache-2.0"] | ||||||
|  | # repository = { type = "github", user = "", repo = "" } | ||||||
|  | # links = [{ title = "Website", href = "" }] | ||||||
|  | # | ||||||
|  | # For a full reference of all the available options, you can have a look at | ||||||
|  | # https://gleam.run/writing-gleam/gleam-toml/. | ||||||
|  | 
 | ||||||
|  | [dependencies] | ||||||
|  | gleam_stdlib = ">= 0.34.0 and < 2.0.0" | ||||||
|  | 
 | ||||||
|  | [dev-dependencies] | ||||||
|  | gleeunit = ">= 1.0.0 and < 2.0.0" | ||||||
							
								
								
									
										5
									
								
								src/webtest.gleam
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								src/webtest.gleam
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | ||||||
|  | import gleam/io | ||||||
|  | 
 | ||||||
|  | pub fn main() { | ||||||
|  |   io.println("Hello from webtest!") | ||||||
|  | } | ||||||
							
								
								
									
										12
									
								
								test/webtest_test.gleam
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								test/webtest_test.gleam
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,12 @@ | ||||||
|  | import gleeunit | ||||||
|  | import gleeunit/should | ||||||
|  | 
 | ||||||
|  | pub fn main() { | ||||||
|  |   gleeunit.main() | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // gleeunit test functions end in `_test` | ||||||
|  | pub fn hello_world_test() { | ||||||
|  |   1 | ||||||
|  |   |> should.equal(1) | ||||||
|  | } | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue