-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added colors, added support for highres images, added some initial tests
Signed-off-by: petetnt <pete.a.nykanen@gmail.com>
- Loading branch information
Showing
10 changed files
with
120 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test.js | ||
fixtures/** |
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,7 +1,15 @@ | ||
# 1.0.0 | ||
# Versions | ||
|
||
## 1.1.0 | ||
|
||
- Added colorized output #2 | ||
- Added support for showing highres images #4 | ||
- Added some initial tests | ||
|
||
## 1.0.0 | ||
|
||
- Complete rewrite using the semi-public API `username/media`. Fixes #1. | ||
|
||
# 0.0.1 - 0.0.3 | ||
## 0.0.1 - 0.0.3 | ||
|
||
- Legacy version using authenticated API communication. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,18 @@ | ||
import test from "ava"; | ||
import execa from "execa"; | ||
import fetchMock from "fetch-mock"; | ||
import asciiShot from "./lib/ascii-shot"; | ||
|
||
const fixtures = require("./fixtures/fixture.json"); | ||
fetchMock.mock("https://instagram.com/petetnt/media", fixtures); | ||
|
||
test("should throw if no username is passed", async t => { | ||
const { stderr } = await execa("./bin/ascii-shot", []); | ||
t.is(stderr, " Error: You must pass an username"); | ||
}); | ||
|
||
test.serial("should call the semi-public api when passed an username", async t => { | ||
asciiShot("petetnt", { highRes: false, noColors: false }).then(() => { | ||
t.truthy(fetchMock.called("https://instagram.com/petetnt/media")); | ||
}); | ||
}); |