reinstate old canal+ for separate PR

This commit is contained in:
Ismaël Moret
2026-04-15 22:03:22 +02:00
committed by GitHub
parent e5e38327d8
commit 297cac8a49
43 changed files with 1962 additions and 2125 deletions

View File

@@ -16,9 +16,9 @@ const channel = {
it('can generate valid url for today', done => {
axios.get.mockImplementation(url => {
if (url.includes('authenticate.json')) {
if (url === 'https://www.canalplus.com/bi/programme-tv/') {
return Promise.resolve({
data: { token: 'f000c6f4ebf44647682b3a0fa66d7d99' }
data: fs.readFileSync(path.resolve(__dirname, '__data__/programme-tv.html'))
})
} else {
return Promise.resolve({ data: '' })
@@ -38,9 +38,9 @@ it('can generate valid url for today', done => {
it('can generate valid url for tomorrow', done => {
axios.get.mockImplementation(url => {
if (url.includes('authenticate.json')) {
if (url === 'https://www.canalplus.com/bi/programme-tv/') {
return Promise.resolve({
data: { token: 'f000c6f4ebf44647682b3a0fa66d7d99' }
data: fs.readFileSync(path.resolve(__dirname, '__data__/programme-tv.html'))
})
} else {
return Promise.resolve({ data: '' })