-
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd77cc3
commit 9859acd
Showing
7 changed files
with
160 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import { Controller } from "ember"; | ||
import SettingsStreams from "models/localstorage/Settings/streams"; | ||
import { | ||
default as SettingsStreams, | ||
DEFAULT_VODCAST_REGEXP | ||
} from "models/localstorage/Settings/streams"; | ||
import { isDarwin } from "utils/node/platform"; | ||
|
||
|
||
export default Controller.extend({ | ||
SettingsStreams, | ||
DEFAULT_VODCAST_REGEXP, | ||
isDarwin | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { | ||
module, | ||
test | ||
} from "qunit"; | ||
import { DEFAULT_VODCAST_REGEXP } from "models/localstorage/Settings/streams"; | ||
|
||
|
||
module( "models/localstorage/Settings/streams" ); | ||
|
||
|
||
test( "Default Vodcast RegExp", assert => { | ||
|
||
const re = new RegExp( DEFAULT_VODCAST_REGEXP, "i" ); | ||
|
||
const shouldMatch = [ | ||
"I'M NOT LIVE!!!", | ||
"RERUN: Title", | ||
"This is a re-run of yesterday's stream", | ||
"Restreaming yesterday's stream", | ||
"I'm just re-streaming", | ||
"vodcast", | ||
"vod-cast", | ||
"vodcasting", | ||
"vod-casting", | ||
"rebroadcast", | ||
"re-broadcast", | ||
"rebroadcasting", | ||
"re-broadcasting" | ||
]; | ||
|
||
const shouldNotMatch = [ | ||
"rerunning", | ||
"re-running", | ||
"restream", | ||
"re-stream", | ||
"This broadcast is presented by", | ||
"Fear not. Live your life!" | ||
]; | ||
|
||
assert.ok( | ||
shouldMatch.every( str => re.test( str ) ), | ||
"All strings expected to match match" | ||
); | ||
assert.ok( | ||
!shouldNotMatch.some( str => re.test( str ) ), | ||
"All strings expected not to match don't match" | ||
); | ||
|
||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters