mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Update unit tests
This commit is contained in:
1 parent
0622d7f5b7
commit
c4d5ce154c
1 file changed
+4
-4
@@ -45,20 +45,20 @@ final class BuildsTest extends TestCase
|
||||
|
||||
public function testSiteBuildCommandAppendsDetectionFileListing(): void
|
||||
{
|
||||
$command = $this->callBuilds('prepareSiteBuildCommand', 'npm run build', './dist folder');
|
||||
$command = $this->callBuilds('prepareSiteBuildCommand', 'npm run build', './dist folder', 'astro');
|
||||
|
||||
$this->assertStringStartsWith('npm run build && echo "{APPWRITE_DETECTION_SEPARATOR_START}"', $command);
|
||||
$this->assertStringContainsString('cd /usr/local/build && cd \'./dist folder\'', (string) $command);
|
||||
$this->assertStringContainsString('find . -name \'node_modules\' -prune -o -type f -print', (string) $command);
|
||||
$this->assertStringContainsString('( [ -e \'server/entry.mjs\' ] && echo \'server/entry.mjs\' || true )', (string) $command);
|
||||
$this->assertStringEndsWith('echo "{APPWRITE_DETECTION_SEPARATOR_END}"', $command);
|
||||
}
|
||||
|
||||
public function testSiteBuildCommandCanBeOnlyDetectionFileListing(): void
|
||||
{
|
||||
$command = $this->callBuilds('prepareSiteBuildCommand', '', '');
|
||||
$command = $this->callBuilds('prepareSiteBuildCommand', '', '', 'sveltekit');
|
||||
|
||||
$this->assertStringStartsWith('echo "{APPWRITE_DETECTION_SEPARATOR_START}"', $command);
|
||||
$this->assertStringContainsString('cd /usr/local/build && find .', (string) $command);
|
||||
$this->assertStringContainsString('cd /usr/local/build && ( [ -e \'handler.js\' ] && echo \'handler.js\' || true )', (string) $command);
|
||||
}
|
||||
|
||||
public function testSplitSiteDetectionLogsRemovesDetectionBlock(): void
|
||||
|
||||
Reference in new issue
Block a user