test: get-set deprecation should check stderr now

This commit is contained in:
Hans 2018-09-04 14:04:43 -07:00 committed by Alex Eagle
parent 189563d277
commit 4a25d7c9b4

View File

@ -5,14 +5,14 @@ export default function() {
const depRegEx = /get\/set have been deprecated in favor of the config command\./;
return Promise.resolve()
.then(() => ng('get'))
.then(({ stdout }) => {
if (!stdout.match(depRegEx)) {
.then(({ stderr }) => {
if (!stderr.match(depRegEx)) {
throw new Error(`Expected deprecation warning.`);
}
})
.then(() => ng('set'))
.then(({ stdout }) => {
if (!stdout.match(depRegEx)) {
.then(({ stderr }) => {
if (!stderr.match(depRegEx)) {
throw new Error(`Expected deprecation warning.`);
}
});