You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
571 B
15 lines
571 B
import 'package:dynamite_runtime/src/utils/uri.dart'; |
|
import 'package:test/test.dart'; |
|
|
|
void main() { |
|
test('UriExtension', () { |
|
var uri = Uri(scheme: 'https', host: 'example.com', path: '/'); |
|
expect(uri.normalizeEmptyPath().toString(), 'https://example.com'); |
|
|
|
uri = Uri(scheme: 'https', host: 'example.com', path: '/slug'); |
|
expect(uri.normalizeEmptyPath().toString(), 'https://example.com/slug'); |
|
|
|
uri = Uri(scheme: 'https', host: 'example.com', path: '/slug/'); |
|
expect(uri.normalizeEmptyPath().toString(), 'https://example.com/slug'); |
|
}); |
|
}
|
|
|