mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-19 22:05:20 +00:00
overhaul tests
This commit is contained in:
1
test/apps/ignore/src/routes/[slug].html
Normal file
1
test/apps/ignore/src/routes/[slug].html
Normal file
@@ -0,0 +1 @@
|
||||
<h1>{params.slug.toUpperCase()}</h1>
|
||||
3
test/apps/ignore/src/routes/_error.html
Normal file
3
test/apps/ignore/src/routes/_error.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<h1>{status}</h1>
|
||||
|
||||
<p>{error.message}</p>
|
||||
1
test/apps/ignore/src/routes/a.html
Normal file
1
test/apps/ignore/src/routes/a.html
Normal file
@@ -0,0 +1 @@
|
||||
<h1>a</h1>
|
||||
11
test/apps/ignore/src/routes/b/index.html
Normal file
11
test/apps/ignore/src/routes/b/index.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<h1>{letter}</h1>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
preload() {
|
||||
return this.fetch('b.json').then(r => r.json()).then(letter => {
|
||||
return { letter };
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
3
test/apps/ignore/src/routes/b/index.json.js
Normal file
3
test/apps/ignore/src/routes/b/index.json.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export function get(req, res) {
|
||||
res.end(JSON.stringify('b'));
|
||||
}
|
||||
3
test/apps/ignore/src/routes/index.html
Normal file
3
test/apps/ignore/src/routes/index.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<h1>Great success!</h1>
|
||||
|
||||
<a href="a">a</a>
|
||||
Reference in New Issue
Block a user