@@ -89,3 +89,34 @@ test("cat README.md", async ({ page }) => {
8989
9090You are interacting with a virtual filesystem, in your browser!` ) ;
9191} ) ;
92+
93+ test ( "tee new-file.txt" , async ( { page } ) => {
94+ await page . goto ( "/#repl" ) ;
95+ // check the file don't exist
96+ await fillAndSubmitCommand ( page , "ls" , {
97+ expectStdout : `D data
98+ D documents
99+ D logs
100+ F .config
101+ F .hidden_file
102+ F README.md` ,
103+ } ) ;
104+ await fillAndSubmitCommand ( page , "echo Some Content" ) ;
105+ await fillAndSubmitCommand ( page , "tee new-file.txt" , {
106+ expectStdout : "Some Content" ,
107+ } ) ;
108+ await fillAndSubmitCommand ( page , "cat new-file.txt" , {
109+ expectStdout : "Some Content" ,
110+ } ) ;
111+ } ) ;
112+
113+ test ( "tee README.md" , async ( { page } ) => {
114+ await page . goto ( "/#repl" ) ;
115+ await fillAndSubmitCommand ( page , "echo Some Content" ) ;
116+ await fillAndSubmitCommand ( page , "tee README.md" , {
117+ expectStdout : "Some Content" ,
118+ } ) ;
119+ await fillAndSubmitCommand ( page , "cat README.md" , {
120+ expectStdout : "Some Content" ,
121+ } ) ;
122+ } ) ;
0 commit comments